natiny.material.add_tag

Lua
natiny.material.add_tag(material, tag)

Adds a tag to the end of the material's tag list. natiny.render.tag selects models and particle systems by these tags.

Parameters

Name Type Description
material number Material handle from natiny.material.create; 0 raises an error
tag string Tag name; an empty string or a tag the material already has is ignored

Example

Lua
natiny.material.add_tag(glass, "world")
natiny.material.add_tag(glass, "transparent")