예제 #1
0
    private static void LoadResultsScene(Scene resultScene, LoadSceneMode y)
    {
        ResultSceneManager resultSceneManager = null;

        foreach (GameObject obj in resultScene.GetRootGameObjects())
        {
            ResultSceneManager comp;
            if ((comp = obj.GetComponent <ResultSceneManager>()) != null)
            {
                resultSceneManager = comp;
            }
        }

        if (resultSceneManager == null)
        {
            throw new Exception("No scene manager found");
        }

        resultSceneManager.Load(Instance.result);

        Destroy(Instance);
        SceneManager.sceneLoaded -= LoadResultsScene;
    }
예제 #2
0
 void Start()
 {
     resultScene = GameObject.Find("ResultSceneManager").GetComponent <ResultSceneManager>();
     button      = gameObject.GetComponent <Button>();
 }