MyBox
MyBox copied to clipboard
Foldout doesn't work properly in child classes
It seems like the access modifiers sometimes prevent the field to be added in the foldouts for child classes. Example:
public class Parent : MonoBehaviour {
#region Serialized fields
[field: Foldout("Parent", true)]
[field: SerializeField] protected bool AAA;
[field: SerializeField] protected bool BBB;
[field: SerializeField] public bool DDD { get; private set; }
[field: SerializeField] public bool EEE { get; protected set; }
[field: SerializeField] public bool FFF { protected get; set; }
[field: SerializeField] public bool GGG;
[field: SerializeField] private protected bool HHH;
#endregion
}
public class Child : Parent {
#region Serialized fields
[field: Foldout("Child", true)]
[field: SerializeField] private bool CCC;
#endregion
}