SpriteFactory.Sprite.currentMaterialSetIndex
C#: int currentMaterialSetIndex
JS: var currentMaterialSetIndex : int
Description
The index of the current material set used by the Sprite.
You can switch between material sets in the inspector, which will change the material used by the Sprite. However, to change material sets during gameplay via scripting, it's recommended you call ChangeMaterialSet instead. (The reason for this is that the change may take place 1 frame after assignment during gameplay by setting the variable, but the change takes place instantly when set via the aforementioned function.)
See Also
ChangeMaterialSet