Multigraph prefab problem?

I have a prefab for the A* object.

This is used in several scenes. So far when I make a change in the A*Obj and ‘apply’ it that change is reflected in any scene in which it is used.

However, I’ve just added another graph and the change is not present in the other scenes no matter how I ‘apply’ and ‘revert’ the prefab. The only way I see the change is if I delete the instance from the scene and drag in the prefab again.

Just though I’d let you know, in case it’s a bug!

urgh! I’ve realized my mistake. StartPath takes a graphmask as a parameter. Missed that!

Oops. Wrong thread. Ignore my last comment.

Hi

Hm… I think it might be because the A* object stores the graph has an opaque blob (it has to bypass Unity serialization because I want to support saving graphs to file, and Unity’s serialization system does not handle a large amount of data very well). So when the inspector is active, it will have deserialized the graphs already, so reverting the prefab will update the blob data, but immediately when deselecting the A* object, the blob will be overwritten with the old data again (because that was what was deserialized). I think as a workaround you could revert the prefab when using the inspector in debug mode.

Alternatively you can load the graphs from a file (for example a TextAsset).
See http://arongranberg.com/astar/docs/save-load-graphs.php