IEnumerator Start() { yield return(CustomSceneManager.WaitForSceneLoadedOrUnloaded(toLoad)); if (CustomSceneManager.IsSceneUnloaded(toLoad)) { yield return(CustomSceneManager.LoadSceneAsync(toLoad, LoadSceneMode.Additive)); } }
public IEnumerator RequestUnload() { numLoadRequests--; yield return(CustomSceneManager.WaitForSceneLoadedOrUnloaded(sceneToLoad)); if (numLoadRequests < 1 && CustomSceneManager.IsSceneLoaded(sceneToLoad)) { yield return(CustomSceneManager.UnloadSceneAsync(sceneToLoad)); } }
public IEnumerator RequestLoad() { numLoadRequests++; yield return(CustomSceneManager.WaitForSceneLoadedOrUnloaded(sceneToLoad)); if (numLoadRequests > 0 && CustomSceneManager.IsSceneUnloaded(sceneToLoad)) { yield return(CustomSceneManager.LoadSceneAsync(sceneToLoad, LoadSceneMode.Additive)); } }
IEnumerator Start() { yield return(CustomSceneManager.WaitForSceneLoadedOrUnloaded(playerScene)); if (CustomSceneManager.IsSceneUnloaded(playerScene)) { yield return(CustomSceneManager.LoadSceneAsync(playerScene, LoadSceneMode.Additive)); GameObject player = GameObject.FindWithTag("Player"); player.transform.position = transform.position; } }