Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Changing material properties of masked UI

$
0
0
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:
Code (CSharp):
  1. Image.materialForRendering.SetFloat("_Property", 0f);
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

Viewing all articles
Browse latest Browse all 1466670

Trending Articles