- Home /
How do I load a scence upon clicking on and object?
I have tried to write a very simple script but it will not work:
var Level: 0 ;
function OnMouseUp () { Application.LoadLevel(Level); }
Perhaps you can help me fix my script or give me another one. Thank You!
Just to be clear - I'm giving this script to the object (3D Text). Should it go to the Controller ins$$anonymous$$d?
Answer by Sundar · Sep 29, 2012 at 04:20 PM
Did you add your level 0 into your build settings? If not
File->BuildSettings
Drag and drop your level 0 scene into "Scenes In Build" or click "Add Current" if your are currently in level 0 in editor.
O$$anonymous$$G! LOL! I had the object behind a plane just didn't realize because it was 3D text. But I still can't get the variable to show up, therefore i cant change it to the level causing more bugs. -.-
Your answer
Follow this Question
Related Questions
Can a script be loaded to a next scene? 3 Answers
Space Invaders style game bug. 1 Answer
Make a global variable that can be accessed in different scenes 2 Answers
Teleporting from one scene to another and back again with the same player gameobject 1 Answer
How to make GUI text disappear after a few seconds? 1 Answer