Path.next returns null

Hi,
I run a script that creates a path 2 times in a row. Then I run another script which takes the first of the created paths and then does path2 = path.next ;
The result is null. Why is that? Do I need to serialize the paths myself first? I tried waiting a second before running the second script, but that didn’t help either.

`
Debug.Log (path);
Debug.Log (path.next);`

returns

Pathfinding.ABPath Null

What could be the cause of this? I tried for over an hour now and am still clueless :S

Hi

path.next is an internal variable. You should not use it. It is used internally as a linked list for the pathfinding queue.

The path.next variable will be set when a path enters the path queue and reset to null when leaving it.

ah thank you, too bad it doesn’t give the next path in the scene, that would have been useful.