game(scripts): sceneloader -> SceneLoader

This commit is contained in:
Mark Joshwel 2025-02-15 00:43:55 +08:00
parent ddef973b3e
commit cc493c7924

View file

@ -0,0 +1,21 @@
/*
* Author: Wai Lam
* Date: 7/2/25
* Description: Loading scene from start to game
*/
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneLoader : MonoBehaviour
{
public string sceneName; // Name of the scene to load
public void LoadScene()
{
if (!string.IsNullOrEmpty(sceneName))
SceneManager.LoadScene(sceneName);
else
Debug.LogWarning("Scene name is not assigned!");
}
}