Accessing graphs in editor mode

Hi,

I’m writing a tool that needs to do some pathfinding in editor mode. Is there a way to manually initialize the graphs, so that I can access them when the game is not running?

Hi

Hm…
Well, I guess you might be able to do something like
AstarPath ap = // Find AstarPath object ap.Awake (); ABPath p = ABPath.Construct (...); ap.StartPath (p); ap.WaitForPath ( p );

But the code might have some if (Application.isEditor) in some places, so I am not sure how well it would work…
The best thing I can think of right now is to go into play mode, do the path searching and then exit playmode while having the data saved somehow.

I’ve tried the this:
AstarPath.active.Awake();
Which I guess is essentially the same. When I do this I don’t get any errors, but some of the paths returned appear to have faulty data.

There are no problems when I try the same while the game is running, with or without this line.