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

customiseAStar(500,500,250,250);

//then scan the map

gameObject.SendMessage(“Scan”,SendMessageOptions.DontRequireReceiver);

//the customise function

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

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

	graph.width=w;

	graph.depth=d;

	graph.center=Vector3(x,0,z);

	graph.UpdateSizeFromWidthDepth ();

 }

}

hope others find this useful