updating astar gridgraph at runtime

hi all,

Searched for an hour and couldn’t find an answer. I’m using the pro version of Aron’s excellent pathfinding scripts. I can’t figure out how to update the size of the graph at runtime. We have a project with a single a star prefab but multiple scenes. I want to change the size of the grid as each scene loads. Specifically, I want to change the width, depth, x and z of the gridgraph at runtime, preferably via javascript. Can anyone help?

Thanks in advance

got there eventually

//change the size of the GridGraph


//then scan the map


//the customise function

function customiseAStar(w:int,d:int,x:int,z:int){

for (var graph:IUpdatableGraph in AstarPath.active.astarData.GetUpdateableGraphs ()) {




	graph.UpdateSizeFromWidthDepth ();



hope others find this useful