public UIScreenBase SetTransitionScreen(UIScreenType screenType, UIScreenArgs args)
        {
            if (m_transitionScreen != null)
            {
                m_transitionScreen.ReleaseResources();

                m_transitionScreen.transform.parent = null;
                m_transitionScreen.gameObject.SetActive(false);
                GameObject.Destroy(m_transitionScreen.gameObject);
            }

            if (screenType == UIScreenType.None)
            {
                m_transitionScreen = null;
                return(null);
            }

            m_transitionScreen = LoadScreen(screenType) as UIScreenBase;
            if (m_transitionScreen == null)
            {
                return(null);
            }

            IncrementScreenPanelDepth(m_transitionScreen, m_transitionPanelDepth);

            m_transitionScreen.Initialize(args);

            return(m_transitionScreen);
        }
        public UIScreenBase SetHUD(UIScreenType screenType, UIScreenArgs args)
        {
            if (m_hud != null)
            {
                m_hud.ReleaseResources();

                m_hud.transform.parent = null;
                m_hud.gameObject.SetActive(false);
                GameObject.Destroy(m_hud.gameObject);
            }

            if (screenType == UIScreenType.None)
            {
                m_hud = null;
                return(null);
            }

            m_hud = LoadScreen(screenType);
            if (m_hud == null)
            {
                return(null);
            }

            m_hud.Initialize(args);
            return(m_hud);
        }
        public UIScreenBase PushScreen(UIScreenType screenType, UIScreenArgs args)
        {
            UIScreenBase screen = LoadScreen(screenType);

            if (screen == null)
            {
                return(null);
            }

            m_currentPanelDepth = IncrementScreenPanelDepth(screen, m_currentPanelDepth);

            m_screenStack.Push(screen);
            screen.Initialize(args);

            return(screen);
        }