NaughtyAttributes icon indicating copy to clipboard operation
NaughtyAttributes copied to clipboard

[Request] Suppress ExpandableAttribute warning

Open rhys-vdw opened this issue 3 years ago • 0 comments

I use the following pattern:

  public abstract class ProbabilityConfig<T> : ScriptableObject where T : Object {
    [System.Serializable]
    public struct Entry {
      [Expandable]
      public T Value;
      public int Weight;
    }

    [SerializeField] Entry[] _entries;

Sometimes the inheriting class uses SOs, sometimes it uses other types. In the case where I'm using non-SO types I get a lot of noise in the inspector:

image

I would like to open a PR that adds an option to suppress this warning, e.g.:

[Expandable(WarnOnIncompatible = false)]

rhys-vdw avatar Feb 28 '22 04:02 rhys-vdw