UnityEditor.SceneView.GetSceneViewRenderingPath C# (CSharp) Method

GetSceneViewRenderingPath() static private method

static private GetSceneViewRenderingPath ( ) : RenderingPath
return RenderingPath
        internal static RenderingPath GetSceneViewRenderingPath()
        {
            Camera mainCamera = GetMainCamera();
            if (mainCamera != null)
            {
                return mainCamera.renderingPath;
            }
            return RenderingPath.UsePlayerSettings;
        }

Usage Example

示例#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();
 }
All Usage Examples Of UnityEditor.SceneView::GetSceneViewRenderingPath