Files
unity-application/Assets/Common/Scripts/ChangeSceneOnClick.cs
Dries Van Schuylenbergh 2fa54620ef Wes xx build fix
2023-03-09 12:44:11 +00:00

24 lines
508 B
C#

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);
}
}