I have two UI Text instances, each one with a material attached to it. I would like to change a material’s property for a shader like:
[into a script attached to UI Text]
this.gameObject.GetComponent<Text>().material.SetFloat ("myValue", 0.5f);
This works but unfortunately it sets the float variable for ALL the UI Text instances. I would like to change it only for one UI Text instance. How can I achieve this?