Hi guys, I am learning how to use Unity and creating a simple Menu with START and QUIT but I am having a problem to load the scene. I have the message “The referenced script on this Behaviour (Game Object ‘MainMenu’) is missing!”
Some advice, pls? My Unity is 2018.1.1f1
Thanks.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MainMenu : MonoBehaviour {
public void PlayGame ()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
public void QuitGame ()
{
Debug.Log("QUIT!");
Application.Quit();
}
}