private void EnlightenBakeSettings() { SerializedObject serializedObject = new SerializedObject(LightmapEditorSettings.GetLightmapSettings()); SerializedProperty serializedProperty = serializedObject.FindProperty("m_GISettings.m_EnableRealtimeLightmaps"); SerializedProperty serializedProperty2 = serializedObject.FindProperty("m_GISettings.m_EnableBakedLightmaps"); bool boolValue = serializedProperty.boolValue; this.RealtimeGUI(serializedObject, serializedProperty); this.BakedGUI(serializedObject, serializedProperty.boolValue, serializedProperty2); this.GeneralSettingsGUI(serializedObject, serializedProperty.boolValue, serializedProperty2.boolValue); if (serializedProperty2.boolValue && serializedProperty.boolValue && !boolValue) { Lightmapping.ClearPrecompSetIsDone(); } serializedObject.ApplyModifiedProperties(); }
private void EnlightenBakeSettings() { SerializedObject so = new SerializedObject(LightmapEditorSettings.GetLightmapSettings()); SerializedProperty enableRealtimeGI = so.FindProperty("m_GISettings.m_EnableRealtimeLightmaps"); SerializedProperty enableBakedGI = so.FindProperty("m_GISettings.m_EnableBakedLightmaps"); bool boolValue = enableRealtimeGI.boolValue; this.RealtimeGUI(so, enableRealtimeGI); this.BakedGUI(so, enableRealtimeGI.boolValue, enableBakedGI); this.GeneralSettingsGUI(so, enableRealtimeGI.boolValue, enableBakedGI.boolValue); if ((enableBakedGI.boolValue && enableRealtimeGI.boolValue) && !boolValue) { Lightmapping.ClearPrecompSetIsDone(); } so.ApplyModifiedProperties(); }