#Don't override field's PropertyDrawer with an Attribute

1 messages · Page 1 of 1 (latest)

faint wadi
#
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
    EditorGUI.BeginChangeCheck();

    EditorGUI.PropertyField(position, property, label, true);

    if (EditorGUI.EndChangeCheck())
        property.serializedObject.ApplyModifiedPropertiesWithoutUndo();
}

The following PropertyDrawer.OnGUI method of IgnoreUndoAttribute completely blocks the field's PropertyDrawer, when applied to it

[IgnoreUndo]
[SerializeField] private Test testField;
#

So, having TestDrawer.OnGUI print something doesn't work