This is the code for my start menu-
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class QuitMenuScript : MonoBehaviour {
public Canvas quitMenu;
public Button startText;
public Button exitText;
// Use this for initialization
void Start () {
quitMenu = quitMenu.GetComponent<Component> ();
startText = startText.GetComponent<Button> ();
exitText = exitText.GetComponent<Button> ();
quitMenu.enabled = false;
}
// Update is called once per frame
void Update () {
public void ExitPress(){
quitMenu.enabled = true;
startText.enabled = false;
exitText.enabled = false;
}
public void NoPress() {
quitMenu.enabled = false;
startText.enabled = true;
exitText.enabled = true;
}
public void ExitGame() {
Application.Quit ();
}
}
End!
This is the place where I am recieving an error-
public void ExitPress(){
quitMenu.enabled = true;
startText.enabled = false;
exitText.enabled = false;
}
It says ‘Public’ is an unexpected symbol!
Please help and thank you!