I have searched in and find out how to add it by selecting a texture and heading up to gameobject>creat other>GUI TEXTURE..But how can i do it on script? and if possible to have it positioned in the left part regardless of the Screen resolution.
I hope you can help me out! :)
Answer by cpp_fanatic
Feb 14, 2011 at 07:38 PM
The simplest way:
Texture2D image = (Texture2D)Resources.Load("image1");
Note the follows:
Draw the image:
GUI.DrawTexture(new Rect(0, 0, image.width, image.height), image);
GUI.DrawTexture and GUITexture are 2 different system !
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
No one has followed this question yet.
How do I change the font and color of GUI text?
dirty lens effect over light help
Load an image from www and save it for offline use
reference Gui texture outside script
Null reference exception[SOLVED]