Vital.sandbox
Model

self:get_materials

Shared

Retrieves a list of all material names on a specific component


Syntax

local materials = self:get_materials(component)

Parameters

TypeNameDescription
stringcomponentPath of the component to retrieve materials from

Returns

TypeNameDescription
tablematerialsArray of material name strings

Examples

Print all material names on a specific component
local entity = model.create("character")
local materials = entity:get_materials("Skeleton3D/Head")

engine.iprint(materials)

On this page