Hello guys,
I use NGUI 3.0.2
I have a UITexture with a material which I want to change on runtime.
manaBubbleMat = transform.FindChild("MagicBubble").gameObject.transform.FindChild("mpBar").transform.GetComponent(UITexture).material;
manaBubbleMat.SetFloat("_Cutoff", manaInPercent);
But it seems that there is no automatic Update//drawcall of the material. Sometimes, e.g. some colliders triggers, then the material updates//drawcalls
The editor shows the changed material. I mean I can see the changed Cutoff. But not it does not change ingame. Hope you can understand what I mean. My english is not the best
Regards Martin