public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { EditorGUIHelper.ProfilePropertyAndNewButtonGUI(position, property, label, () => CreateNewProfile(property)); GrassPostProcessProfile myTarget = (property.objectReferenceValue as GrassPostProcessProfile); if (null == myTarget) { return; } PostProcessesGUI(myTarget, property); }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { property.serializedObject.Update(); position.height = EditorGUI.GetPropertyHeight(property, label, true); EditorGUIHelper.ProfilePropertyAndNewButtonGUI(position, property, label, () => CreateNewMaterialProfileMenu(property)); property.serializedObject.ApplyModifiedProperties(); property.serializedObject.Update(); property.isExpanded = true; if (property.objectReferenceValue == null) { return; } DrawAllChildrensGUI(position, property); property.serializedObject.ApplyModifiedProperties(); }