Writing Graph Generators

Hi,
I’m a new user evaluating the latest free version of A* under Unity 4 Pro before buying.

My use case is procedural level design with a need to auto create the graph after level creation/regeneration.

I checked the forums for similar questions and see you generally point to http://arongranberg.com/astar/docs/writing-graph-generators.php and to roll your own graph generator as the solution, then scan after creation.

I have a couple of questions.
My test case is a simple maze created in XZ from prefabs. Should I use a new graph generator based on grid or points as best for this?
At some point I may layer these for a 3D maze test as well, but in the first instance I just want to check pathfinding in a 2d maze case.

I tried to run the above graph generator polar graph tutorial but it has a few errors, which makes things a little confusing when trying to get to grips with the package.

  1. It should be using Pathfinding.Serialization.JsonFx; not JsonFx.Json I think?
  2. After fixing this I still get two errors on int3 ie: nodes [0].position = matrix.MultiplyPoint (Vector3.zero); gives error “Assets/Scripts/PolarGraph.cs(29,27): error CS0266: Cannot implicitly convert type UnityEngine.Vector3' toPathfinding.Int3’. An explicit conversion exists (are you missing a cast?)”

ty!

Edit: Ok, fixed the errors with a simple nodes [0].position = new Int3(matrix.MultiplyPoint (Vector3.zero));

But I still would like to know what would be best for my use case: grid or point style graph? In either case I guess I just feed it the positions of my tile prefabs?

ty!

I’ve played around with this further, and it looks like I can create an instance of the standard PointGraph and feed it the tag of the nodes I create.

How do I get aStar to add this graph though? There was nothing in the tutorial about this step.
Create graph generator (or use inbuilt) , feed it the nodes, rescan.
But I gather it needs to also be added to AStarPath doesn’t it?

Edit: Answering my own question… astarPath.astarData.AddGraph(pointGraph);