Tutorials/Help with using Astar directly in MonoDevelop

Since i’m using astar on maps that aren’t generated until runtime, I have to set up everything manually in MonoDevelop. I’ve been looking for good tutorials on this, but everything I find involves using astar on premade maps in unity, almost none of them even mention MonoDevelop. I’ve tried looking through the documentation too, but most of the examples and use cases also presume you start off by making your chosen graphs in Unity, not manually. Any help?


I assume you mean creating your graphs through C# and not in the Unity editor? MonoDevelop is just an IDE for writing scripts.

You can create all graphs from scratch, however what I recommend most of the time is that you just configure everything in the Unity editor, and then during runtime you just call AstarPath.active.Scan () to scan the graph after you are done creating your level.
You can also edit settings like this:
var graph = AstarPath.active.astarData.gridGraph;
graph.center = transform.position; (or whatever)
graph.width = 50;
graph.depth = 50;

// Needed after updating center/width/depth
graph.UpdateSizeFromWidthDepth ();

// Calculate the graph with the new settings