Pathfinding.LayerGridGraph.PostDeserialization C# (CSharp) Method

PostDeserialization() public method

public PostDeserialization ( ) : void
return void
		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;
					}
				}
			}
		}