void WalkToClosestResource() { resourceToGather = resourceFinder.FindClosest(currentlyGathering); agent.destination = GetClosestBound(resourceToGather); animator.SetBool("IsWalking", Vector3.Distance(agent.destination, transform.position) > agent.stoppingDistance + 0.5); Task.current.Succeed(); }