Hi, I’m trying to change the width and depth of the layered gridgraph area during runtime and well regular gridgraph works but when I try to access the layered version I get a null reference exception using the astarData.gridGraph and I cant find one that references the layered version. Have I totally missed it? I’m using APP Pro version 3.5.2
Hi
The Layered grid graph does not have a shortcut, but you can do:
AstarPath.active.astarData.FindGraphOfType (typeof(LayerGridGraph)) as LayerGridGraph;
or if you know that you only have one graph:
AstarPath.graphs[0] as LayerGridGraph;
Ah thanks