In AddProxyNode() in RewindableAction.cs, when AddChild() is called, the Node being spawned is just called "Node". Thus, when the sanity check if-statement looks for a child Node with name _proxyName ("InternalRewindableAction") it doesn't find it, so it is always false and proceeds to add the newly created child. This makes it so that if you make a change to the scene and save the change, a new node is spawned. You can't see these nodes as they are internal (set with AddChild() parameter). But when you run the scene and check Remote in the Editor, you can have any number of them created. I noticed 22 of them before I looked to see what was happening.
Another potential issue (I may just be mistaken), but assuming this process were to work as expected, if in Initialize() we do _rewindableAction = (Node)_script.New();, then if AddProxyNode() does return without adding the child due to it having been created previously, doesn't that mean we're now using a newly created node and not the child that was created previously? After the first Initialization and successful call of AddProxyNode() that added proxy node isn't accessed ever again, we end up using a newly created one instantiated in Initialize() but never childed.
In
AddProxyNode()in RewindableAction.cs, whenAddChild()is called, the Node being spawned is just called "Node". Thus, when the sanity check if-statement looks for a child Node with name _proxyName ("InternalRewindableAction") it doesn't find it, so it is always false and proceeds to add the newly created child. This makes it so that if you make a change to the scene and save the change, a new node is spawned. You can't see these nodes as they are internal (set withAddChild()parameter). But when you run the scene and check Remote in the Editor, you can have any number of them created. I noticed 22 of them before I looked to see what was happening.Another potential issue (I may just be mistaken), but assuming this process were to work as expected, if in
Initialize()we do_rewindableAction = (Node)_script.New();, then ifAddProxyNode()does return without adding the child due to it having been created previously, doesn't that mean we're now using a newly created node and not the child that was created previously? After the first Initialization and successful call ofAddProxyNode()that added proxy node isn't accessed ever again, we end up using a newly created one instantiated inInitialize()but never childed.