Exemplo n.º 1
0
        private void Update()
        {
            if (Input.GetKeyUp(KeyCode.C))
            {
                SwitchCameraMode();
            }

            if (Input.GetKeyUp(KeyCode.U))
            {
                _uiCanvas.gameObject.SetActive(!_uiCanvas.gameObject.activeSelf);
            }

            if (Input.GetKeyUp(KeyCode.F1))
            {
                if (detailManager.gameObject.activeSelf && persistRemoval)
                {
                    detailMapData = GPUInstancerAPI.GetDetailMapData(detailManager);
                }
                detailManager.gameObject.SetActive(!detailManager.gameObject.activeSelf);
                if (detailManager.gameObject.activeSelf)
                {
                    if (persistRemoval && detailMapData != null)
                    {
                        GPUInstancerAPI.SetDetailMapData(detailManager, detailMapData);
                    }
                    _loadingTerrainDetailsText.SetActive(true);
                    GPUInstancerAPI.SetCamera(_activeCameraGO.GetComponentInChildren <Camera>());
                    GPUInstancerAPI.StartListeningGPUIEvent(GPUInstancerEventType.DetailInitializationFinished, DisableLoadingTerrainDetailsText);
                }
                SetQualityMode(_currentQualityMode);
            }

            if (Input.GetKeyUp(KeyCode.F2))
            {
                SetQualityMode(QualityMode.Low);
            }

            if (Input.GetKeyUp(KeyCode.F3))
            {
                SetQualityMode(QualityMode.Mid);
            }

            if (Input.GetKeyUp(KeyCode.F4))
            {
                SetQualityMode(QualityMode.High);
            }
        }