Model
self:get_materials
Shared
Retrieves a list of all material names on a specific component
Syntax
local materials = self:get_materials(component)Parameters
| Type | Name | Description |
|---|---|---|
string | component | Path of the component to retrieve materials from |
Returns
| Type | Name | Description |
|---|---|---|
table | materials | Array of material name strings |
Examples
local entity = model.create("character")
local materials = entity:get_materials("Skeleton3D/Head")
engine.iprint(materials)