i am trying to load my level from the main menu and it just will not work.
#pragma strict
function Start () {
}
if(Input.GetMouseButtonUp(0)){
Application.LoadLevel("Bootcamp");
}
i am trying to load my level from the main menu and it just will not work.
#pragma strict
function Start () {
}
if(Input.GetMouseButtonUp(0)){
Application.LoadLevel("Bootcamp");
}
Have you added the Level 1 (BootCamp) to your build settings? try that
Sorry again i thought i had clicked “add new comment” i have put this as the answer as i hav solved the problem. thanks for everyones help. the problem was what D4rt said so i changed the code. and will carry on using the tutorials and docs. i will also watch the unity answers tutorial right now Em3rgency thank you for your help.
here is the code i have used.
function OnMouseEnter()
{
// change color of text to green
renderer.material.color = Color.green;
}
function OnMouseExit()
{
// change color of text back to white
renderer.material.color = Color.white;
}
function Update ()
{ // Load level when left mouse button clicked
if(Input.GetMouseButtonDown(0))
Application.LoadLevel(“Bootcamp”);
}