arimger/Unity-Editor-Toolbox

Headers on classes and structs disappear

Closed this issue · 2 comments

The header attribute doesn't work when you put it on a class or struct.

Editor toolbox enabled:
image

Editor toolbox disabled:
image

Here's my code

public class Weapon : Item
{
        [Header("Data")]
        public bool shootAuto = true;

        [Header("Attachments")]
        public AttachmentType<WeaponBarrel> barrels;
        public AttachmentType<WeaponMagazine> magazines;
        public AttachmentType<WeaponAttachment>[] otherAttachments;

        [System.Serializable]
        public class AttachmentType
        {
            public virtual WeaponAttachment[] Attachments { get; }
        }

        [System.Serializable]
        public class AttachmentType<T> : AttachmentType where T : WeaponAttachment
        {
            public T[] attachments;

            public override WeaponAttachment[] Attachments => attachments;
        }
}

Unity version: 2020.3.26f1
Toolbox version: 0.11.9

Unity-based decorators are not fully supported by the Toolbox, please use LabelAttribute (1 to 1 equivalent with additional features) or TitleAttribute instead.

Closing due to inactivity.