- Home /
When I click on 'play' by the main menu, level 1 won't start... How to fix that?
public var welcomeLabel : GUIStyle;
public var scoreLabel : GUIStyle;
public var customSkin : GUISkin;
public var welcomeRocket : Rect;
public var playGameRect : Rect;
public var quitRect : Rect;
function OnGUI(){
Screen.lockCursor = false;
Time.timeScale=1;
var scale : Vector3 = new Vector3(Screen.width / 1280.0, Screen.height / 1024.0, 1.0);
GUI.matrix = Matrix4x4.Scale(scale);
GUI.Label(welcomeRocket, "ParkingGame",welcomeLabel);
GUI.skin = customSkin;
GUI.skin = customSkin; //1
if(GUI.Button(playGameRect, "Play")){
Application.LoadLevel(1);
}
if(GUI.Button(quitRect,"Exit")){
Application.Quit();
}
}
THAN$$anonymous$$S THAN$$anonymous$$S THAN$$anonymous$$S THAN$$anonymous$$S THAN$$anonymous$$S VEEEEEERRRRYYYYYY $$anonymous$$UUCCCHHHH
Answer by HarshadK · Aug 08, 2014 at 11:11 AM
Check if you have included the scene for your level one in build settings.
Where can I find my build settings? Because i was looking but i couldn't find it....
Under File -> Build Settings.
Then drag and drop the scene for your level one in the list above.
Also make sure the checkbox against that level is selected.
Answer by gjf · Aug 08, 2014 at 11:12 AM
have you added your scenes in File -> BuildSettings
?
Application.LoadLevel(1);
references the second entry in the list...
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
reset level on collision 3 Answers
Experience System 1 Answer
Built game error 0 Answers
Making a start screen in Unity 3 Answers