Here’s the senario:
- connect the game object to the editor script by dragging it to a custom ObjectField
- The custom editor creates several checkboxes that get reflected in the game object’s inspector view
- Set the checkboxes I want reflected in the game object (this part works fine)
- enter play mode (everything here works fine with the expected flags set from the checkboxes)
- stop play mode
- Attempt to change the check boxes again, the change are no longer reflected in the game object’s inspector view
All of my custom scripts are already marked as serializable (hence why it works on the first play). I’m also marking the game object dirty in the onGUI function. I tried accessing the game object via instanceID with the same result.
I’ve read about the possibility of saving the state via asset, but since I can’t seem to access the object to update it so I’m not sure this gets me anything.
Any other suggestions?