How to exclude Header attribute inside unity custom editor

Viewed 533

I'm trying to make a custom UnityEditor and stumbled upon a problem for hours. I have this problem when I try to use EditorGUILayout.PropertyField on the editor script. I can't use other editor field either because some of my custom class has custom PropertyDrawer.

Editor tool I tried to make:

enter image description here

Here's the code I used in the editor

SerializedObject so = new SerializedObject(entry.target);

so.Update();
SerializedProperty prop = so.FindProperty(entry.memberName);

if (prop != null)
    EditorGUILayout.PropertyField(prop, GUIContent.none);

so.ApplyModifiedProperties();

And here is the implementations. I use a custom property drawer for the Optional<> :

[Header("Targets")]
public Transform targetContainer;

[Header("Position")]
public Optional<AttachMode> attachPosition = new Optional<AttachMode>(AttachMode.Relative, true);

Is there any way not to include the [Header] attribute inside the EditorGUILayout.PropertyField?

0 Answers
Related