public void FindPathInCoroutine() { autoPathfinding.isOn = false; StopAllCoroutines(); EnsureFindingContext(); if (pathfinder.state == PathfindingState.Found || pathfinder.state == PathfindingState.Failed) { pathfinder.CleanUp(); } pathfinder.Init(tileData.GetTile(start.x, start.y), tileData.GetTile(end.x, end.y)); StartCoroutine(InternalFindPathInCoroutine()); }