using FirstVillain.Singleton; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class SceneLoadManager : UnitySingleton { public void LoadSceneAsync(string sceneName, LoadSceneMode mode, Action onComplete) { if(mode == LoadSceneMode.Single) { //·Îµù »©°í UI Á¤¸® UIManager.Instance.ReleaseUI(); } var handle = SceneManager.LoadSceneAsync(sceneName, mode); handle.completed += complete => { onComplete?.Invoke(); }; } /// /// Load Scene with loading UI /// /// /// /// public void LoadSceneAsync(string sceneName, Action onComplete, E_UI_TYPE loadingUI) { UIManager.Instance.OpenLoadingUI(loadingUI); UIManager.Instance.ReleaseUI(); var handle = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Single); handle.completed += complete => { onComplete?.Invoke(); }; } }