/// <summary> /// Gets the remaining distance on pathway. /// </summary> /// <returns>The remaining path.</returns> public float GetRemainingPath() { Vector2 distance = destination.transform.position - transform.position; return(distance.magnitude + path.GetPathDistance(destination)); }