using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneManager : MonoBehaviour
{
// Load a scene by name
public void LoadScene(string sceneName)
{
SceneManager.LoadScene(sceneName);
}
// Load the next scene in the build settings
public void LoadNextScene()
{
int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
SceneManager.LoadScene(currentSceneIndex + 1);
}
// Reload the current scene
public void ReloadScene()
{
int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
SceneManager.LoadScene(currentSceneIndex);
}
// Quit the application
public void QuitGame()
{
Application.Quit();
}
}