So i wrote down this start menu script and it says unexpected symbol ‘(’ and i cant find it can someone please point it out and tell me how to fix it.
using UnityEngine.SceneManagement;
using UnityEngine.UI;// we need this namespace in order to access UI elements within our script
using System.Collections;
public class menuScript : MonoBehaviour
{
public Canvas quitMenu;
public Button startText;
public Button exitText;
void Start()
{
quitMenu = quitMenu.GetComponent<Canvas>();
startText = startText.GetComponent<Button>();
exitText = exitText.GetComponent<Button>();
quitMenu.enabled = false;
}
public void ExitPress() //this function will be used on our Exit button
{
quitMenu.enabled = true; //enable the Quit menu when we click the Exit button
startText.enabled = false; //then disable the Play and Exit buttons so they cannot be clicked
exitText.enabled = false;
}
public void NoPress() //this function will be used for our "NO" button in our Quit Menu
{
quitMenu.enabled = false; //we'll disable the quit menu, meaning it won't be visible anymore
startText.enabled = true; //enable the Play and Exit buttons again so they can be clicked
exitText.enabled = true;
}
public void StartLevel() //this function will be used on our Play button
{
}
public void ExitGame() //This function will be used on our "Yes" button in our Quit menu
{
Application.Quit(); //this will quit our game. Note this will only work after building the game
}
SceneManager.loadScene(1)
}