I have a Monobehaviour that has [ExecuteInEditMode] on it that I’m using a [CustomEditor] with while working on a tool. The problem I’m facing is I have some indexes that live on the MonoBehaviour that I’m using to know which dropdown option is selected via the CustomEditor. When the project recompiles, I lose this information which is making tool development quite difficult. I’ve tried marking them with [SerializeField] but they still get wiped.
Do I need to use EditorPrefs? Some other approach here?