MenuManager

This commit is contained in:
2026-03-18 13:24:26 +01:00
parent 78816be938
commit 14417ef368

View File

@@ -0,0 +1,22 @@
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MenuManager : MonoBehaviour
{
public void LoadScene(string sceneName)
{
StartCoroutine(LoadAsync(sceneName));
}
private IEnumerator LoadAsync(string sceneName)
{
AsyncOperation operation = SceneManager.LoadSceneAsync(sceneName);
while (!operation.isDone)
{
Debug.Log(operation.progress);
yield return null;
}
}
}