GetSceneViewRenderingPath() static private method

static private GetSceneViewRenderingPath ( ) : RenderingPath
return RenderingPath
Exemplo n.º 1
0
 public override void OnInspectorGUI()
 {
     base.serializedObject.Update();
     this.m_ShowEditor = EditorGUILayout.ToggleTitlebar(this.m_ShowEditor, FogEditor.Styles.fogHeader, this.m_Fog);
     if (this.m_ShowEditor)
     {
         EditorGUI.indentLevel++;
         EditorGUI.BeginDisabledGroup(!this.m_Fog.boolValue);
         EditorGUILayout.PropertyField(this.m_FogColor, new GUILayoutOption[0]);
         EditorGUILayout.PropertyField(this.m_FogMode, new GUILayoutOption[0]);
         EditorGUI.indentLevel++;
         FogMode intValue = (FogMode)this.m_FogMode.intValue;
         if (intValue != FogMode.Linear)
         {
             EditorGUILayout.PropertyField(this.m_FogDensity, FogEditor.Styles.fogDensity, new GUILayoutOption[0]);
         }
         else
         {
             EditorGUILayout.PropertyField(this.m_LinearFogStart, FogEditor.Styles.fogLinearStart, new GUILayoutOption[0]);
             EditorGUILayout.PropertyField(this.m_LinearFogEnd, FogEditor.Styles.fogLinearEnd, new GUILayoutOption[0]);
         }
         EditorGUI.indentLevel--;
         if (SceneView.GetSceneViewRenderingPath() == RenderingPath.DeferredShading)
         {
             EditorGUILayout.HelpBox(FogEditor.Styles.fogWarning.text, MessageType.Info);
         }
         EditorGUILayout.EndFadeGroup();
         EditorGUI.EndDisabledGroup();
         EditorGUI.indentLevel--;
     }
     base.serializedObject.ApplyModifiedProperties();
 }
Exemplo n.º 2
0
            internal void OnGUI(Renderer renderer, bool useMiniStyle)
            {
                if (this.m_UseLightProbes != null)
                {
                    EditorGUI.BeginDisabledGroup(LightmapEditorSettings.IsLightmappedOrDynamicLightmappedForRendering(renderer));
                    if (!useMiniStyle)
                    {
                        EditorGUILayout.PropertyField(this.m_UseLightProbes, this.m_UseLightProbesStyle, new GUILayoutOption[0]);
                    }
                    else
                    {
                        ModuleUI.GUIToggle(this.m_UseLightProbesStyle, this.m_UseLightProbes);
                    }
                    EditorGUI.EndDisabledGroup();
                }
                if (!useMiniStyle)
                {
                    this.m_ReflectionProbeUsage.intValue = (int)((ReflectionProbeUsage)EditorGUILayout.EnumPopup(this.m_ReflectionProbeUsageStyle, (ReflectionProbeUsage)this.m_ReflectionProbeUsage.intValue, new GUILayoutOption[0]));
                }
                else
                {
                    ModuleUI.GUIPopup(this.m_ReflectionProbeUsageStyle, this.m_ReflectionProbeUsage, Enum.GetNames(typeof(ReflectionProbeUsage)));
                }
                bool flag = this.m_ReflectionProbeUsage.intValue != 0;

                if (((this.m_UseLightProbes != null) && this.m_UseLightProbes.boolValue) || flag)
                {
                    EditorGUI.indentLevel++;
                    if (!useMiniStyle)
                    {
                        EditorGUILayout.PropertyField(this.m_ProbeAnchor, this.m_ProbeAnchorStyle, new GUILayoutOption[0]);
                    }
                    else
                    {
                        ModuleUI.GUIObject(this.m_ProbeAnchorStyle, this.m_ProbeAnchor);
                    }
                    if (flag)
                    {
                        if (SceneView.GetSceneViewRenderingPath() == RenderingPath.DeferredShading)
                        {
                            EditorGUILayout.HelpBox(this.m_DeferredNote.text, MessageType.Info);
                        }
                        else
                        {
                            renderer.GetClosestReflectionProbes(this.m_BlendInfo);
                            ShowClosestReflectionProbes(this.m_BlendInfo);
                        }
                    }
                    EditorGUI.indentLevel--;
                }
            }
Exemplo n.º 3
0
 public override void OnInspectorGUI()
 {
     base.serializedObject.Update();
     if (base.targets.Length == 1)
     {
         this.DoToolbar();
     }
     this.m_ShowProbeModeRealtimeOptions.target = this.reflectionProbeMode == ReflectionProbeMode.Realtime;
     this.m_ShowProbeModeCustomOptions.target   = this.reflectionProbeMode == ReflectionProbeMode.Custom;
     EditorGUILayout.IntPopup(this.m_Mode, Styles.reflectionProbeMode, Styles.reflectionProbeModeValues, Styles.typeText, new GUILayoutOption[0]);
     if (!this.m_Mode.hasMultipleDifferentValues)
     {
         EditorGUI.indentLevel++;
         if (EditorGUILayout.BeginFadeGroup(this.m_ShowProbeModeCustomOptions.faded))
         {
             EditorGUILayout.PropertyField(this.m_RenderDynamicObjects, Styles.renderDynamicObjects, new GUILayoutOption[0]);
             EditorGUI.BeginChangeCheck();
             EditorGUI.showMixedValue = this.m_CustomBakedTexture.hasMultipleDifferentValues;
             UnityEngine.Object obj2 = EditorGUILayout.ObjectField(Styles.customCubemapText, this.m_CustomBakedTexture.objectReferenceValue, typeof(Cubemap), false, new GUILayoutOption[0]);
             EditorGUI.showMixedValue = false;
             if (EditorGUI.EndChangeCheck())
             {
                 this.m_CustomBakedTexture.objectReferenceValue = obj2;
             }
         }
         EditorGUILayout.EndFadeGroup();
         if (EditorGUILayout.BeginFadeGroup(this.m_ShowProbeModeRealtimeOptions.faded))
         {
             EditorGUILayout.PropertyField(this.m_RefreshMode, Styles.refreshMode, new GUILayoutOption[0]);
             EditorGUILayout.PropertyField(this.m_TimeSlicingMode, Styles.timeSlicing, new GUILayoutOption[0]);
             EditorGUILayout.Space();
         }
         EditorGUILayout.EndFadeGroup();
         EditorGUI.indentLevel--;
     }
     EditorGUILayout.Space();
     GUILayout.Label(Styles.runtimeSettingsHeader, new GUILayoutOption[0]);
     EditorGUI.indentLevel++;
     EditorGUILayout.PropertyField(this.m_Importance, Styles.importanceText, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_IntensityMultiplier, Styles.intensityText, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_BoxProjection, Styles.boxProjectionText, new GUILayoutOption[0]);
     EditorGUI.BeginDisabledGroup(SceneView.GetSceneViewRenderingPath() != RenderingPath.DeferredShading);
     EditorGUILayout.PropertyField(this.m_BlendDistance, Styles.blendDistanceText, new GUILayoutOption[0]);
     EditorGUI.EndDisabledGroup();
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowBoxOptions.faded))
     {
         EditorGUI.BeginChangeCheck();
         EditorGUILayout.PropertyField(this.m_BoxSize, Styles.sizeText, new GUILayoutOption[0]);
         EditorGUILayout.PropertyField(this.m_BoxOffset, Styles.centerText, new GUILayoutOption[0]);
         if (EditorGUI.EndChangeCheck())
         {
             Vector3 center = this.m_BoxOffset.vector3Value;
             Vector3 size   = this.m_BoxSize.vector3Value;
             if (this.ValidateAABB(ref center, ref size))
             {
                 this.m_BoxOffset.vector3Value = center;
                 this.m_BoxSize.vector3Value   = size;
             }
         }
     }
     EditorGUILayout.EndFadeGroup();
     EditorGUI.indentLevel--;
     EditorGUILayout.Space();
     GUILayout.Label(Styles.captureCubemapHeaderText, new GUILayoutOption[0]);
     EditorGUI.indentLevel++;
     GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.MinWidth(40f) };
     EditorGUILayout.IntPopup(this.m_Resolution, Styles.renderTextureSizes, Styles.renderTextureSizesValues, Styles.resolutionText, options);
     EditorGUILayout.PropertyField(this.m_HDR, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_ShadowDistance, new GUILayoutOption[0]);
     EditorGUILayout.IntPopup(this.m_ClearFlags, Styles.clearFlags, Styles.clearFlagsValues, Styles.clearFlagsText, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_BackgroundColor, Styles.backgroundColorText, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_CullingMask, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_UseOcclusionCulling, new GUILayoutOption[0]);
     EditorGUILayout.PropertiesField(EditorGUI.s_ClipingPlanesLabel, this.m_NearAndFarProperties, EditorGUI.s_NearAndFarLabels, 35f, new GUILayoutOption[0]);
     EditorGUI.indentLevel--;
     EditorGUILayout.Space();
     if (base.targets.Length == 1)
     {
         ReflectionProbe target = (ReflectionProbe)this.target;
         if ((target.mode == ReflectionProbeMode.Custom) && (target.customBakedTexture != null))
         {
             Cubemap customBakedTexture = (Cubemap)target.customBakedTexture;
             if (customBakedTexture.mipmapCount == 1)
             {
                 EditorGUILayout.HelpBox("No mipmaps in the cubemap, Smoothness value in Standard shader will be ignored.", MessageType.Warning);
             }
         }
     }
     this.DoBakeButton();
     EditorGUILayout.Space();
     base.serializedObject.ApplyModifiedProperties();
 }