natiny.material.get_tag

Lua
natiny.material.get_tag(material, index) -> tag

Returns the name of one of the material's tags. Tags are indexed in the order they were added.

Parameters

Name Type Description
material number Material handle from natiny.material.create; 0 raises an error
index integer Zero-based tag index, below natiny.material.get_tag_count

Returns

Type Description
string Tag name; nil for a negative index, an index past the end or an invalid handle

Example

Lua
local first = natiny.material.get_tag(glass, 0)