EditorAttributes is a unity package that adds some extra editor attributes to your project to easily customize your editors without having to write any editor code.
using UnityEngine;
public class Example : MonoBehaviour
{
[SerializeReference] public IStateVar exampleVar = new ExampleVar();
}
public interface IStateVar { }
using EditorAttributes;
[System.Serializable]
public struct ExampleVar : IStateVar
{
public bool shouldShow;
public int intA;
[ShowField(nameof(shouldShow))]
public int intB;
}
currently doing
Produces this error
This seems to happen with any field that ask for the name of a condition (ShowField, HideField, ConditionalField, DisableField, etc).