IEnumerator Start()
    {
        yield return(CustomSceneManager.WaitForSceneLoadedOrUnloaded(toLoad));

        if (CustomSceneManager.IsSceneUnloaded(toLoad))
        {
            yield return(CustomSceneManager.LoadSceneAsync(toLoad, LoadSceneMode.Additive));
        }
    }
예제 #2
0
    public IEnumerator RequestLoad()
    {
        numLoadRequests++;
        yield return(CustomSceneManager.WaitForSceneLoadedOrUnloaded(sceneToLoad));

        if (numLoadRequests > 0 && CustomSceneManager.IsSceneUnloaded(sceneToLoad))
        {
            yield return(CustomSceneManager.LoadSceneAsync(sceneToLoad, LoadSceneMode.Additive));
        }
    }
예제 #3
0
    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;
        }
    }