///
/// Level Select.
/// Attached to Main Camera
///
using UnityEngine;
using System.Collections;
public class LevelSelect : MonoBehaviour {
public Texture backgroundTexture;
void OnGUI(){
//Display our Background Texture
GUI.DrawTexture (new Rect (0, 0, Screen.width, Screen.height), backgroundTexture);
//Displays our Buttons
if (GUI.Button (new Rect (Screen.width * .1f, Screen.height * .15f, Screen.width * .1f, Screen.height * .1f), "1")) {
print ("Clicked 1");
Application.LoadLevel ("Level1")
}
if (GUI.Button (new Rect (Screen.width * .2f, Screen.height * .15f, Screen.width * .1f, Screen.height * .1f), "2")) {
print ("Clicked 2");
}
}
}
Im in one scene and my buttons pop up
but once i put the code from line 21 which says
Application.LoadLevel ("Level1")
it says error:
Assets/Level Select/Scripts/LevelSelect.cs(22,17): error CS1525: Unexpected symbol `}'
Please help me with this so i may move on