I'm having trouble changing material properties for a masked UI image. I am aware a mask will use a modified (new) material for the image and therefor I can't set the properties to the base material. So as I have found, the solution is to use:
However, this method is quite slow since it will grab all affecting components and find this material. In my case, we have a lot of UI components with some shiny effects where...
Changing material properties of masked UI
Code (CSharp):
- Image.materialForRendering.SetFloat("_Property", 0f);
Changing material properties of masked UI