self:get_type

Client

Retrieves the type name of the instance


Syntax

local result = self:get_type()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
string | boolresultType of the instance, false if unavailable

Examples

Get the type of an audio-2d instance
local entity = core.audio_2d.create("sounds/ambient.ogg")

core.engine.print("info", entity:get_type()) -- 'audio_2d'

On this page