- Home /
Undo problems with a Custom EditorWindow
Hey Guys!
I'm currently experiencing a slight problem.
I have a custom EditorWindow, with a reference to my Graph Object.
Within the graph object I have a "List<>" of Nodes.
Now, when I add or remove from this list, I Record the Graph Object, and then use "SetDirty"
This works fine.
However, When I record the Graph Object, then change a value in a Node, e.g.: Position
I proceed to then mark the Graph Object as dirty.
When I next attempt to undo it, it simply deletes the latest created Node, completely ignoring the smaller changes.
All classes are serializable, but I can't record the single node directly, as it's base is not "UnityEngine.Object".
What should I do? Is this a limitation of the Undo system?
I know I should be using "SerialisedObject/Property" but it is far to much hassle for something as simple as this.
Thanks!