Hello Everyone,
Does someone know what is the syntax for UITexture?
I have this code below but i do get this error upon hitting start?
"NullReferenceException: Object reference not set to an instance of an object
ChangeTextureImageBox.Start () "
UITexture textureComponent = GetComponent<UITexture>();
textureComponent.mainTexture = Resource.Load("texturename") as Texture;
textureComponent.MakePixelPerfect();
What i want to do is dynamically change the texture of object through condition.
Any advice and tips would be much appreciated, BTW that is a class from UIWidget from NGUI. http://tasharen.com/ngui/docs/class_u_i_texture.html