public static bool LightmapParametersGUI(SerializedProperty prop, GUIContent content, bool advancedParameters) { EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); if (advancedParameters) { EditorGUIInternal.AssetPopup <LightmapParameters>(prop, content, "giparams", "Default scene parameter"); } else { EditorGUIInternal.AssetPopup <LightmapParameters>(prop, content, "giparams", "Default-Medium"); } string text = "Edit..."; if (LightingWindowObjectTab.isBuiltIn(prop)) { text = "View"; } bool result = false; if (prop.objectReferenceValue == null) { SerializedObject serializedObject = new SerializedObject(LightmapEditorSettings.GetLightmapSettings()); SerializedProperty serializedProperty = serializedObject.FindProperty("m_LightmapEditorSettings.m_LightmapParameters"); using (new EditorGUI.DisabledScope(serializedProperty == null)) { if (GUILayout.Button(text, EditorStyles.miniButton, new GUILayoutOption[] { GUILayout.ExpandWidth(false) })) { Selection.activeObject = serializedProperty.objectReferenceValue; result = true; } } } else if (GUILayout.Button(text, EditorStyles.miniButton, new GUILayoutOption[] { GUILayout.ExpandWidth(false) })) { Selection.activeObject = prop.objectReferenceValue; result = true; } EditorGUILayout.EndHorizontal(); return(result); }