Setting Graph Root Triggers Undo

Hi, just started using A* for some pathfinding, and I’ve encountered an issue on Unity 4.3. Every time I try to set a root transform for a point graph, Undo gets called. I thought this might be due to a custom graph type I’ve created, but on further testing it happens on a clean install on Unity 4.3. Issue does not occur on Unity 4.2.

This is preventing me from using the graphs as I’d like to, and is causing a serious problem. I noticed that there is a known bug related to the serialiazation of graphs, and on checking, the hash of the bytes array returned by SerializeGraphs does not match the hash of script.astarData.GetData(). (AstarPathEditor.cs line 2143)

Am I the only one experiencing this issue? Is there a solution for it?

Using A* Pathfinding

Thanks for you time.

An undo event… That’s really odd.

Unfortunately I cannot replicate it on Unity 4.6b9 which I am using at the moment.
Try to add the script “UnityReferenceHelper” to the object before assigning it to the slot.

Hmm…definitely seeing it in Unity 4.3.4f1, w/ some more experimentation, I can set the root transform if I open the ‘Select Transform’ dialog, but I can’t drag it from my scene hierarchy. The UnityReferenceHelper is getting added automatically to the object I set as root.

I did some experimentation. It seems unity does actually send an undo event, so it’s not my scripts which have some bug. I really wonder why unity sends an undo event at that point. Also the annoying thing is that I cannot really see anything which distinguishes it from a normal undo event, so I cannot filter it out…

Odd, suddenly the undo events just stopped being triggered…


I’ll keep an eye out, see if I can dig up some more information about this. For the time being, I’ll make do w/ the workaround I’ve found.

Thanks for your effort in trying to resolve this issue. :slight_smile: