Material Attributes
What Are Material Attributes
Material attributes are an easy way to put custom data into a material, they consist of a name and a value.
How To Define a Material Attribute
- First, locate the Attributes tab.
- The section highlighted below is where you can add, edit, and remove Attributes.
- To add a new value, click the plus button at the bottom. Double click on the name or value fields to edit them. To remove a value, click the X button.
Using Attributes
After giving your material an attribute, it can be referenced through code. The Example below shows how to change the material of the citizen model's skin in real time.
The skin material for the citizen has a material attribute named Skin with the value set to 1