if(CompleteState!=PathCompleteState.Complete)thrownewSystem.Exception("Something went wrong. At this point the path should be completed");
}
/// <summary>
/// Traces the calculated path from the start node to the end.
/// This will build an array (<see cref="path)"/> of the nodes this path will pass through and also set the <see cref="vectorPath"/> array to the <see cref="path"/> arrays positions.
/// This implementation will use the <see cref="flood"/> (FloodPath) to trace the path from precalculated data.
/// </summary>
publicvoidTrace(GraphNodefrom){
GraphNodec=from;
intcount=0;
while(c!=null){
path.Add(c);
vectorPath.Add((Vector3)c.position);
c=flood.GetParent(c);
count++;
if(count>1024){
Debug.LogWarning("Inifinity loop? >1024 node path. Remove this message if you really have that long paths (FloodPathTracer.cs, Trace function)");