Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: ranilian on September 20, 2012, 03:17:50 PM
-
Hey,
I have a UITexture that updates it's mainTexture element every now and then, now the Texture field in the Inspector under the UITexture script updates to the new texture however it draws the old texture in game.
The panel has a hardclip. What I noticed is that whenever I disable/enable the UITexture it updates the drawn texture.
-
To confirm you are using the UITexture.mainTexture to set the new texture correct?
-
Yep.
-
I'm not 100% sure the reason by try doing a panel.refresh after it should fix the issue i think.
-
Nope. Does not help. It doesn't seem to refresh the actual UITexture children, unless I disable/enable them.
-
This issue plagues me as well.
I change the uitexture's mainTexture, but it's never updated on screen.
I've tried to do stuff to jolt it, such as "MarkAsChanged()" and getting the UIPanel to refresh, but to no avail. Any hints?
-
When I look at the material on the UITexture and watch it in the editor it changes fine out there, it just doesn't update on screen at all.
-
When in doubt -- debug it. I can't help atm. KLM lost my luggage and my laptop is dying.
-
Sorry for the comment spam.
I think I got this just after I posted. I've been debuggin for a while now. :P
It's because the UITexture had a material assigned instead of a texture, so it changed the texture in the material, but not on screen.
When I remove the assigned material and assign nothing in the prefab and set a texture to mainTexture in code it updates fine.
Sorry about your luggage! I hope you enjoy your stay in DK in any case. :)