public override void PostDeserialization () {
#if ASTARDEBUG
Debug.Log ("Grid Graph - Post Deserialize");
#endif
GenerateMatrix ();
SetUpOffsetsAndCosts ();
if (nodes == null || nodes.Length == 0) return;
//graphNodes = new GridNode[nodes.Length];
LevelGridNode.SetGridGraph (AstarPath.active.astarData.GetGraphIndex(this),this);
for (int z = 0; z < depth; z ++) {
for (int x = 0; x < width; x++) {
for (int i=0;i<layerCount;i++) {
LevelGridNode node = nodes[z*width+x + width*depth*i];
if (node == null) {
continue;
}
node.NodeInGridIndex = z*width+x;
}
}
}
}