- Home /
Use the GUITexture to go to the next scene
Hi, I am new in the Unity.
I have a simple question that I can't solve it: How to use the GUITexture to go to the next scene? like load next level
for example that I click the GUITexture and scene to next scene. (the GUITexture is a little picture)
Can help me a script?
Thanks a lot.
And Sorry for my bad English.
Answer by aldonaletto · Oct 15, 2011 at 12:37 AM
A GUITexture can detect mouse clicks. Just add this script to the GUITexture:
function OnMouseDown(){
Application.LoadLevel("Level2");
}
By the way, the example in OnMouseDown is exactly about this subject.
but it doesn't work for android,do you what can I do to make this works? @aldonaletto
Your answer
Follow this Question
Related Questions
Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer
Screen Resolution and GUI cutoff issue. Android. 1 Answer
My GUITexture looks awful 2 Answers
fade in out multi images then go to next scene 1 Answer
Toggle GuiTexture 1 Answer