Model
self:is_type
Shared
Checks whether the instance belongs to the specified type
Syntax
local result = self:is_type(name)Parameters
| Type | Name | Description |
|---|---|---|
string | name | Type to check against |
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if the instance matches the given type, false otherwise |
Examples
local entity = model.create("character")
engine.print("info", entity:is_type("model")) --true
engine.print("info", entity:is_type("webview")) --false