Hi. I’m trying to call WaitForPath
on a MultiTargetPath while in the editor (not in play mode):
// My code
var p = MultiTargetPath.Construct(origin, targets, onPathCompletes, OnPathComplete);
p.pathsForAll = true;
AstarPath.StartPath(p);
AstarPath.WaitForPath(p);
I’m getting the following exception:
System.NullReferenceException: Object reference not set to an instance of an object
at AstarPath.WaitForPath (Pathfinding.Path p) [0x00148] in /Users/mikelaurence/projects/lunar-lockdown-2d/Assets/AstarPathfindingProject/Core/AstarPath.cs:2244
This is what’s at AstarPath line 2244:
//Calculate some paths
threadEnumerator.MoveNext();
Any suggestions for how to move forward here?
I’m on v 3.8.12.