Exemplo n.º 1
0
        public void ChangeScene(string _nextSceneName)
        {
            if (UICanvas.GetUICanvas("FadeCanvas") == null)
            {
                var fadeCanvas = UICanvas.CreateUICanvas("FadeCanvas");
                DontDestroyOnLoad(fadeCanvas);
                fadeCanvas.GetComponent <Canvas>().sortingOrder = 20000;
            }
            UIPopup fade = UIPopup.GetPopup("Fade");

            fade.GetComponent <FadeOverlay>().Show(_nextSceneName);
        }