- Home /
Load next level
I have a code that loads the next level when entering a trigger box and the end of each level, but i've reached an unexpected problem. At stage 2, when I used the exact same code, settings and trigger box (copy and paste), it won't load "stage3". I tried changing up the number, so that it loads "stage2" and that works just fine. Same thing goes when trying to load "stage1". But when I set it to load "stage3" it wont. I tried "stage4", same thing. I've double checked the names of the stage in assets, I've tried to delete and re-do stage 3, nothing works. When I reach the trigger box I just walk right trough it. My code looks like this
function OnTriggerEnter (other : Collider) {
Application.LoadLevel( "stage3" );
}
Any help, or a different code, would be greatly appreciated
Do what alucardj said. Go to Project Settings-> Editor Build Settings and add drag the scene into the empty space inside the menu.