Enums are not staying set between Editor and MonoBehavior (target) class

Entity Class and EntityEditor Class

alt text

I’m using an enumPopup to change the player character type. It was working fine and then it stopped. I made no changes to the code in either class between working and non-working states.

Regardless, when selecting an enum in the Inspector it used to change enums and run the code in the switch statement. Now it just defaults to the first enum (Caster) no matter what I try. I have confirmed that target.characterSelect is being set in EntityEditor. By the time that the Start method runs in Entity, target.characterSelect is set back to the first enum (Caster).

Any ideas where I went wrong?

Make sure you are calling EditorUtility.SetDirty(target) when something has changed in the inspector gui. You can check for that using GUI.changed.