- Home /
Need to go to next scene(next prefab)
hii, i'm trying to make a simple game, in which i have created a scene of rotation of cube. Now i need to go to another scene or we can say nxt window after 'some time,(like we do in flash from one frame to nxt frame).
Or In simple way when i 'll click on one window nxt window will appear, and when i'll click on second window another will come and so on...... how can do it?
Is there any tutorial or some example are here to help me..?
If it is wrong question, or not possible to do, the also plz tel me...
Answer by DaveA · Mar 15, 2011 at 07:29 AM
You probably want this: http://unity3d.com/support/documentation/ScriptReference/Application.LoadLevel.html
Look into Input.GetMouseDown for handling clicks
ok that means i need to add this -- Application.LoadLevel ("HighScore") in rotation script as i need to go to nxt window aftr some rotation. But this level name means scene name or something else? This is the way i'm trying to do it... var degreesPerSecond : float = 50.0; function Update() { transform.Rotate(Vector3.up degreesPerSecond Time.deltaTime, Space.Self); transform.Rotate(Vector3.left* degreesPerSecond * Time.deltaTime,Space.Self); rigidbody.is$$anonymous$$inematic = true; Application.LoadLevel ("level1"); }
is it right way?
that would rotate the object then instantly load that scene.
Your answer
Follow this Question
Related Questions
how can I freeze the scene while watching a gui window ? 3 Answers
Editor scene preview window 0 Answers
Why is half of my "game" tab completely grayed out? 1 Answer
moving to next scene 1 Answer
Rendering a camera to an Editor Window 2 Answers