Model

self:get_components

Shared

Retrieves a list of all component paths on the model

Syntax

local components = self:get_components(
    include_all = false
)

Parameters

TypeNameDescription
boolinclude_allDetermines which components are listed:
• When true - components that are currently not rendered are listed as well
• When false - only the components currently rendered on the model are listed

Returns

TypeNameDescription
tablecomponentsArray of component path strings

Examples

Print all component paths on a model
local entity = core.model.create("character")
local components = entity:get_components()

core.engine.iprint(components)

On this page