public override void OnInspectorGUI() { m_SerializedHDLight.Update(); // Add space before the first collapsible area EditorGUILayout.Space(); ApplyAdditionalComponentsVisibility(true); HDLightUI.Inspector.Draw(m_SerializedHDLight, this); m_SerializedHDLight.Apply(); if (m_SerializedHDLight.needUpdateAreaLightEmissiveMeshComponents) { UpdateAreaLightEmissiveMeshComponents(); } }
public override void OnInspectorGUI() { m_SerializedHDLight.Update(); //add space before the first collapsible area EditorGUILayout.Space(); // Disable the default light editor for the release, it is just use for development /* * // Temporary toggle to go back to the old editor & separated additional datas * bool useOldInspector = m_AdditionalLightData.useOldInspector.boolValue; * * if (GUILayout.Button("Toggle default light editor")) * useOldInspector = !useOldInspector; * * m_AdditionalLightData.useOldInspector.boolValue = useOldInspector; * * if (useOldInspector) * { * DrawDefaultInspector(); * ApplyAdditionalComponentsVisibility(false); * m_SerializedAdditionalShadowData.ApplyModifiedProperties(); * m_SerializedAdditionalLightData.ApplyModifiedProperties(); * return; * } */ // New editor ApplyAdditionalComponentsVisibility(true); HDLightUI.Inspector.Draw(m_SerializedHDLight, this); m_SerializedHDLight.Apply(); if (m_SerializedHDLight.needUpdateAreaLightEmissiveMeshComponents) { UpdateAreaLightEmissiveMeshComponents(); } }