예제 #1
0
        void Update()
        {
            DebugManager debugManager = DebugManager.instance;

            debugManager.UpdateActions();

            if (debugManager.GetAction(DebugAction.EnableDebugMenu) != 0.0f ||
                debugManager.GetActionToggleDebugMenuWithTouch())
            {
                debugManager.displayRuntimeUI = !debugManager.displayRuntimeUI;
            }

            if (debugManager.displayRuntimeUI && debugManager.GetAction(DebugAction.ResetAll) != 0.0f)
            {
                debugManager.Reset();
            }

            if (debugManager.GetActionReleaseScrollTarget())
            {
                debugManager.SetScrollTarget(null); // Allow mouse wheel scroll without causing auto-scroll
            }
            if (m_Orientation != Screen.orientation)
            {
                StartCoroutine(RefreshRuntimeUINextFrame());
                m_Orientation = Screen.orientation;
            }
        }
예제 #2
0
        void Update()
        {
            DebugManager debugManager = DebugManager.instance;

            // Runtime UI visibility can change i.e. due to scene unload - allow component cleanup in this case.
            if (m_RuntimeUiWasVisibleLastFrame != debugManager.displayRuntimeUI)
            {
                HandleInternalEventSystemComponents(debugManager.displayRuntimeUI);
            }

            debugManager.UpdateActions();

            if (debugManager.GetAction(DebugAction.EnableDebugMenu) != 0.0f ||
                debugManager.GetActionToggleDebugMenuWithTouch())
            {
                debugManager.displayRuntimeUI = !debugManager.displayRuntimeUI;
            }

            if (debugManager.displayRuntimeUI)
            {
                if (debugManager.GetAction(DebugAction.ResetAll) != 0.0f)
                {
                    debugManager.Reset();
                }

                if (debugManager.GetActionReleaseScrollTarget())
                {
                    debugManager.SetScrollTarget(null); // Allow mouse wheel scroll without causing auto-scroll
                }
            }

            if (m_Orientation != Screen.orientation)
            {
                StartCoroutine(RefreshRuntimeUINextFrame());
                m_Orientation = Screen.orientation;
            }

            m_RuntimeUiWasVisibleLastFrame = debugManager.displayRuntimeUI;
        }