natiny.material.has_tag
Lua
natiny.material.has_tag(material, tag) -> has
Whether the material carries this tag.
Parameters
| Name |
Type |
Description |
material |
number |
Material handle |
tag |
string |
Tag name |
Returns
| Type |
Description |
boolean |
true when the material carries the tag |
Example
Lua
local transparent = natiny.material.has_tag(material, "transparent")
Notes
- A tag no material has ever been given reads as
false rather than being
created here; add_tag is what creates one.
- An invalid handle reads as
false.