I am making a drag and drop game for a school project, and the script I use was taken from the Unity tutorial How to Make a Menu, here is the script:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class QuitToMenu : MonoBehaviour
{
public void LoadByIndex(int sceneIndex)
{
SceneManager.LoadScene(0);
}
}
Whenever I press the Start button on my Menu then go to the game scene and click the Quit To Menu button it does not quit for me. It does not give me any errors using the script, so I do not know why it isn’t working.