Pathfinding.RichAI.UpdatePath C# (CSharp) Method

UpdatePath() public method

public UpdatePath ( ) : void
return void
		public virtual void UpdatePath () {
			canSearchPath = true;
			waitingForPathCalc = false;
			Path p = seeker.GetCurrentPath();
			
			//Cancel any eventual pending pathfinding request
			if (p != null && !seeker.IsDone()) {
				p.Error();
				// Make sure it is recycled. We won't receive a callback for this one since we
				// replace the path directly after this
				p.Claim (this);
				p.Release (this);
			}
			
			waitingForPathCalc = true;
			lastRepath = Time.time;
			seeker.StartPath (tr.position, target.position);
		}