UnityEditor.LightEditor.OnInspectorGUI C# (CSharp) Method

OnInspectorGUI() public method

public OnInspectorGUI ( ) : void
return void
        public override void OnInspectorGUI()
        {
            if (s_Styles == null)
            {
                s_Styles = new Styles();
            }
            base.serializedObject.Update();
            this.UpdateShowOptions(false);
            EditorGUILayout.PropertyField(this.m_Type, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(1f - this.m_ShowAreaOptions.faded))
            {
                EditorGUILayout.IntPopup(this.m_Lightmapping, s_Styles.LightmappingModes, s_Styles.LightmappingModeValues, s_Styles.LightmappingModeLabel, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowBakingWarning.faded))
                {
                    EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Enable Baked GI from Lighting window to use Baked or Mixed.").text, MessageType.Warning, false);
                }
                EditorGUILayout.EndFadeGroup();
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.Space();
            float num = 1f - this.m_ShowDirOptions.faded;
            if (EditorGUILayout.BeginFadeGroup(num))
            {
                if (this.m_ShowAreaOptions.target)
                {
                    GUI.enabled = false;
                    string tooltip = "For area lights " + this.m_Range.displayName + " is computed from Width, Height and Intensity";
                    GUIContent label = new GUIContent(this.m_Range.displayName, tooltip);
                    EditorGUILayout.FloatField(label, this.light.range, new GUILayoutOption[0]);
                    GUI.enabled = true;
                }
                else
                {
                    EditorGUILayout.PropertyField(this.m_Range, new GUILayoutOption[0]);
                }
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowSpotOptions.faded))
            {
                EditorGUILayout.Slider(this.m_SpotAngle, 1f, 179f, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_AreaSizeX, EditorGUIUtility.TextContent("Width"), new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_AreaSizeY, EditorGUIUtility.TextContent("Height"), new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Color, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_Intensity, 0f, 8f, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_BounceIntensity, 0f, 8f, s_Styles.LightBounceIntensity, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectWarning.faded))
            {
                EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Currently realtime indirect bounce light shadowing for spot and point lights is not supported.").text, MessageType.Warning, false);
            }
            EditorGUILayout.EndFadeGroup();
            this.ShadowsGUI();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_Cookie, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowCookieWarning.faded))
                {
                    EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Cookie textures for spot lights should be set to clamp, not repeat, to avoid artifacts.").text, MessageType.Warning, false);
                }
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded * this.m_ShowDirOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_CookieSize, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Halo, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_Flare, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_RenderMode, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_CullingMask, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            if ((SceneView.currentDrawingSceneView != null) && !SceneView.currentDrawingSceneView.m_SceneLighting)
            {
                EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("One of your scene views has lighting disabled, please keep this in mind when editing lighting.").text, MessageType.Warning, false);
            }
            this.CommandBufferGUI();
            base.serializedObject.ApplyModifiedProperties();
        }