Hello!
I want to draw property with EditoryGUI.PropertyField but without drawing any Decorators (like Header and Space)
I’ve wrote example to show what I mean:
[CreateAssetMenu]
public class Parent : ScriptableObject {
public Child child;
}
[Serializable]
public class Child {
[Header("Header")]
public string field;
}
[CustomPropertyDrawer(typeof(Child))]
public class TestDrawerPropertyDrawer : PropertyDrawer {
public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label) {
EditorGUI.BeginProperty(rect, label, property);
EditorGUI.PropertyField(rect, property, label, true);
EditorGUI.EndProperty();
}
}
And I get the following result:
[100094-пример.png|100094]
I tryed to use (or not) EditorGUI.BeginProperty
& EditorGUI.EndProperty
; I even try EditorGUI.MultiplePropertyField
but it draws headers too (and it looks weird).
Does anybody know how to ommit decorators?