natiny_material_get_tag
const char* natiny_material_get_tag(NatinyMaterial material, uint32_t index);
Returns the name of one of the material's tags. Tags are indexed in the order they were added.
Parameters
| Name | Type | Description |
|---|---|---|
material |
NatinyMaterial |
Material handle from natiny_material_create |
index |
uint32_t |
Zero-based tag index, below natiny_material_get_tag_count |
Returns
| Type | Description |
|---|---|
const char* |
Null-terminated tag name owned by the engine; NULL for an index past the end or an invalid handle |
Example
const char* first = natiny_material_get_tag(glass, 0);
Notes
- The string stays valid until
natiny_backend_shutdown, even after the tag is removed or the material is destroyed.