- Home /
Duplicate Question
Way to have a pause and play texture in same GUI texture?
Hi, Im creating the pause button for my game. I would like it though that when you press it, it then changes texture to a 'play' texture. I have all the touch input set-up fine and working, but i'm just not sure about it changing texture. Thanks in advance
Not enough information: world object, GUITexture, or GUI.DrawTexture()...are all different. Plus this question has been answered a bunch of times for all three. Please search UA for your specific need. If you get stuck, post a new question with your ongoing code.
Could you link me to them answers then? Because I've been searching for a while and I couldn't find anything. Thanks +robertbu
yes you can few ways, but easiest i think is have one visible then once press change the texture that's visible.
If you are talking about GUITexture, in a script on the game object with the GUITexture component, you can just do:
guiTexture.texture = someTexture;
See the reference page for an example:
http://docs.unity3d.com/Documentation/ScriptReference/GUITexture-texture.html
Follow this Question
Related Questions
GUI Label "flash a Arrow" 1 Answer
Texture2D not showing in build, but shows up in editor 1 Answer
Multiple Cars not working 1 Answer
C# GUI Button 2 Answers