It seems like mocking stuff with [SerializeField]
in an Editor
class won’t serialize the thing after an assembly reload. I have a simple boolean to represent a fold status for my editor - I want to serialize it. i.e. let’s say I unfolded in editor mode, went to play mode and see that it’s still unfolded.
The way I used to do it is have the boolean stored in the target
MonoBehaviour
- (the type whom I’m making the editor for) - but that’s just not clean, why does that MB have to store something, only its editor needs? it doesn’t make sense.
Here’s what my editor looks like:
If knowing any code would help you, let me know.
Thanks.