using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class mainMenu : MonoBehaviour {
public Button Play;
// Use this for initialization
void Start () {
Button playButton = Play.GetComponent<Button> ();
if(playButton.onClick.SceneManagement("load"))
}
// Update is called once per frame
void Update () {
}
}
Any ideas?
line 5, remove the extra brace } from the if statement or add an open brace { above it since you will likely want to add a body to the if statement in the future.
Line 5 closes the Start method.
On line 4, you have an If statement with nothing, you need opening and closing curly brackets.
public class mainMenu : MonoBehaviour
{
public Button Play;
void Start ()
{
Button playButton = Play.GetComponent<Button> ();
if (playButton.onClick.SceneManagement("load"))
{
}
}
void Update ()
{
}
}