Example #1
0
        void Update()
        {
            if (!bEnableCheatConsole)
            {
                return;
            }

#if UNITY_EDITOR || UNITY_STANDALONE
            if (Input.GetKeyDown(KeyCode.F1))
            {
                bool bVisible = ToggleVisible();

                if (bVisible)
                {
                    if (Input.GetKey(KeyCode.LeftControl) ||
                        Input.GetKey(KeyCode.LeftCommand))
                    {
                        ChangeToMobileView();
                    }
                    else
                    {
                        ChangeToPCView();
                    }
                }
            }
#endif

            for (int i = 0; i < Input.touchCount; ++i)
            {
                var CurTouch = Input.GetTouch(i);

                if (CurTouch.fingerId == 4 && CurTouch.phase == TouchPhase.Began)
                {
                    ToggleVisible();
                    break;
                }
            }

            if (Viewer != null)
            {
                Viewer.OnUpdate();
            }
        }