hi guys,
I have only 5 textures....i just want to load it into "OnGUI" function...how can i do it??
and explain which is the best way to do it...i'm trying this for iPhone...i tried before GUI.DrawTexture & Resources.Load....but no luck....
can any one give ans for it???
Thanks in advance.
At the beginning of your script, add this:
var image1 : Texture2D;
var image2 : Texture2D;
and so on.
In the Unity interface, select the object that has the script attached to it. In the Inspector window, there should now be 5 texture boxes, into which you can drag the images you need to access.
Once you've put images into those, you can reference image1, image2, etc as you would an Texture2D.