Ejemplo n.º 1
0
        public static void Open(CloudCamera target)
        {
            NoiseGenerator window = GetWindow <NoiseGenerator>();

            window._target = target;
            window.ShowAuxWindow();
        }
Ejemplo n.º 2
0
 private void OnDisable()
 {
     _cloudCamera = (CloudCamera)target;
     EditorPrefs.SetInt("CloudCameraEditor._editTool", (int)_editTool);
     EditorPrefs.SetBool("CloudCameraEditor._areNoizePowersLocked", _areNoizePowersLocked);
     EditorPrefs.SetBool("CloudCameraEditor._areNoizeScalesLocked", _areNoizeScalesLocked);
 }
Ejemplo n.º 3
0
        private void OnEnable()
        {
            _cloudCamera          = (CloudCamera)target;
            _editTool             = (EditTool)EditorPrefs.GetInt("CloudCameraEditor._editTool");
            _areNoizePowersLocked = EditorPrefs.GetBool("CloudCameraEditor._areNoizePowersLocked");
            _areNoizeScalesLocked = EditorPrefs.GetBool("CloudCameraEditor._areNoizeScalesLocked");

            SetupShader(ref _cloudCamera.blurFastShader, "Hidden/Clouds/BlurFast");
            SetupShader(ref _cloudCamera.blurShader, "Hidden/Clouds/Blur");
            SetupShader(ref _cloudCamera.blurHQShader, "Hidden/Clouds/BlurHQ");

            SetupShader(ref _cloudCamera.depthBlurShader, "Hidden/Clouds/DepthBlur");
            SetupShader(ref _cloudCamera.depthShader, "Hidden/Clouds/Depth");
            SetupShader(ref _cloudCamera.cloudShader, "Hidden/Clouds/Clouds");
            SetupShader(ref _cloudCamera.clearColorShader, "Hidden/Clouds/ClearColor");
        }
Ejemplo n.º 4
0
        public override void OnInspectorGUI()
        {
            _lockedStyle = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).GetStyle("IN LockButton");

            _cloudCamera = (CloudCamera)target;
            Undo.RecordObject(_cloudCamera, "cloud camera");

            _editTool = EditTypeToolbar(_editTool);

            switch (_editTool)
            {
            case EditTool.General:
                GeneralFoldout();
                break;

            case EditTool.Light:
                LightFoldout();
                break;

            case EditTool.Blur:
                BlurFoldout();
                break;

            case EditTool.Noise:
                NoiseFoldout();
                break;
            }

            EditorUtility.SetDirty(_cloudCamera);

            if (!Application.isPlaying)
            {
                // This is done to update the game view smoothly when cloud camera is selected but don't break editor's behaviour:)
                Repaint();
            }
        }