示例#1
0
    private IEnumerator ILoadScenes(string[] scenes)
    {
        foreach (string s in scenes)
        {
            yield return(SceneManager.LoadSceneAsync(s, LoadSceneMode.Additive));
        }

        foreach (Screen s in GameObject.FindObjectsOfType <Screen>())
        {
            ManagerUI.allScreens.Add(s.GetType(), s.gameObject);
            s.transform.localPosition = Vector3.zero;
        }

        ManagerUI.GetScreenObject <ScreenOverlay>().transform.SetAsLastSibling();

        ManagerUI.GetScreenObject <ScreenOverlay>().GetComponent <ScreenOverlay>().OnLoad();

        ManagerUI.GoTo <ScreenView>();

        ManagerUI.GetScreenObject <ScreenOverlay>().GetComponent <ScreenOverlay>().OnScreenEnter();
    }