public override void OnInspectorGUI() { serializedObject.Update(); EditorGUILayout.PropertyField(_editor.resolution); EditorGUILayout.PropertyField(_editor.color); EditorGUILayout.PropertyField(_editor.close); BezierEditor.display = CustomStyles.DrawToggle(BezierEditor.header, BezierEditor.display, BuiltinStyle.toggleModule); if (BezierEditor.display) { _editor.orderList.DoLayoutList(); } if (GUI.changed) { serializedObject.ApplyModifiedProperties(); EditorUtility.SetDirty(_editor.curve); Repaint(); } }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { position.height = EditorGUIUtility.singleLineHeight; EditorGUI.PropertyField(position, property); if (property.objectReferenceValue == null) { return; } PropertySetup(property); _object.Update(); position.y += CustomStyles.lineHeight; EditorGUI.PropertyField(position, _editor.resolution); position.y += CustomStyles.lineHeight; EditorGUI.PropertyField(position, _editor.color); position.y += CustomStyles.lineHeight; EditorGUI.PropertyField(position, _editor.close); BezierEditor.display = CustomStyles.DrawToggle(BezierEditor.header, BezierEditor.display, BuiltinStyle.toggleModule); if (BezierEditor.display) { _editor.orderList.DoLayoutList(); } if (GUI.changed) { _object.ApplyModifiedProperties(); } }