Multipath unreachable bug!?


My situation is sometime the path jump from a floor to another floor because it cannot find the path (all possible paths are blocked by obstacles). I don’t want this happen and I want it return path.error is false.

In order to solve this I reduced the default “Max Nearest Node Distance” 100 -> 2
It solved for Single Path and showed in the log:

Couldn’t find close nodes to either the start or the end (start = True end = False)
Pathfinding.Path:LogError(String) (at Assets/Plugins/AstarPathfindingProject/Pathfinders/Path.cs:208)
Pathfinding.Path:Prepare() (at Assets/Plugins/AstarPathfindingProject/Pathfinders/Path.cs:320)
c__IteratorB:MoveNext() (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:2221)
c__IteratorA:MoveNext() (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:2106)


So far so good. When I run for Multiple path, it shows error:

NullReferenceException: Object reference not set to an instance of an object
Pathfinding.MultiTargetPath.Prepare () (at Assets/Plugins/AstarPathfindingProject/Pathfinders/MultiTargetPath.cs:348)
AstarPath+c__IteratorB.MoveNext () (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:2221)
AstarPath+c__IteratorA.MoveNext () (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:2106)

After this error, shortest path is not functioned any more, I have to restart the game.

Any suggestion?



Yes, that is a bug. The MultiTargetPath could not handle it when some of the target points could not be found. If you want I can give you access to the dev. version where this bug is fixed.

Yes, please

can you send to my inbox the dev version?