using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class ChangeSceneOnClick : MonoBehaviour { // Load scene from path name public void LoadScene(string sceneName) { SceneManager.LoadScene(sceneName); } // Load scene from reference public void LoadScene(Scene scene) { SceneManager.LoadScene(scene.buildIndex); } // Load scene from build index public void LoadScene(int buildIndex) { SceneManager.LoadScene(buildIndex); } }