natiny.material.get_tag_count

Lua
natiny.material.get_tag_count(material) -> count

Returns the number of tags the material has.

Parameters

Name Type Description
material number Material handle from natiny.material.create; 0 raises an error

Returns

Type Description
integer Number of tags; 0 for an invalid handle

Example

Lua
for i = 0, natiny.material.get_tag_count(glass) - 1 do
    print(natiny.material.get_tag(glass, i))
end