Hi, I don’t know if this was asked before, if so, I haven’t found the answer.
I’ve been trying to make a play button that changes the scene from the main menu to the level select screen. I’ve tried tons of different scripts, but they were all obsolete as they worked for only 4 .6 and earlier.
Are there any solutions to this? Whenever I click the button, nothing happens.
Thanks for any help.
using UnityEngine;
using UnityEngine.SceneManagement;
public class UISceneChange : MonoBehaviour
{
public void ButtonClick()
{
SceneManager.LoadScene("SceneName");
//Or index in Player Build
SceneManager.LoadScene(0);
}
}