- Home /
Load New Scene On Collision.
Hello there people I have been working on a Unity project that I'm really excited about. I've been making different rooms in different scenes only problem is........I have no idea on how to make a character walk through a doorway or make collision with a portal or cube and end up in one of my other scenes. I have been working with unity for about 3 years now and yet all the tutorials and scripts i've found don't work. I'm using the Unity MMORPG controller you know the free viking guy? Please help me out guys anyway possible :)
Answer by xikky · Jan 26, 2013 at 08:11 AM
To do this, you have to first go to the Build Settings window from the File Menu. Here you can drag the scenes you have from your Project window and note the ID number provided for each scene.
Then you can put the following code anywhere in the script to switch from one scene to another.
Application.LoadLevel(1);
The '1' in the code above must be changed to the scene's ID that you would like to switch to.
Hope this helps and good luck for you project.
Your answer
Follow this Question
Related Questions
Load New Scene After Player Death? 0 Answers
Controller Collision Load Scene 2 Answers
load level on collision 2 Answers
Scene Audio Script Error 2 Answers
Go To new Scene Button! 1 Answer