Headers on classes and structs disappear
Closed this issue · 2 comments
DockFrankenstein commented
The header attribute doesn't work when you put it on a class or struct.
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
arimger commented
Unity-based decorators are not fully supported by the Toolbox, please use LabelAttribute (1 to 1 equivalent with additional features) or TitleAttribute instead.
arimger commented
Closing due to inactivity.