My script:
void OnMouseDown ()
{
Application.LoadLevel (“_Scene_1”);
}
The other one is the same, but with _Scene_2 instead.
I’ve attached a OnMouseDown script to start that goes to scene 1.Another OnMouseDown to options that goes to scene 2. However, when I click on options, I go to scene 1, which is where start should go. When I press instructions, which shouldn’t have anything been done, goes to scene 2. What is this??? Bug? Im using unity 4.6 beta 17 btw. Is it the range of the OnMouseDown or wat?
-
From looking at your screenshot the scene name is incorrect
The script references a scene called “Scene1” your scene 1 is called “_Scene_1”. Also Ensure the scenes are placed in the build settings window.
-
If there is no box collider added, that will help get the mouse input.
I made you a better Script for your menu buttons too:
public string sceneName;
void OnMouseDown ()
{
Application.LoadLevel (sceneName);
}
This can be added to all buttons and you can enter the scene name into the inspector of the individual buttons.