Hi,
I have version 3.8.6 pro latest on store and use Automatic High Load
I get this error:
Exception while updating graphs:
System.NullReferenceException: Object reference not set to an instance of an object
at AstarPath+c__AnonStorey3.<>m__0 (Pathfinding.GraphNode node) [0x00002] in \Assets\AstarPathfindingProject\Core\AstarPath.cs:1862
at Pathfinding.GridGraph.GetNodes (Pathfinding.GraphNodeDelegateCancelable del) [0x00035] in \Badiya\Assets\AstarPathfindingProject\Generators\GridGenerator.cs:106
at AstarPath.FloodFill () [0x000fa] in \Badiya\Assets\AstarPathfindingProject\Core\AstarPath.cs:1912
at AstarPath.ProcessGraphUpdatesAsync (System.Object _astar) [0x000ab] in \Assets\AstarPathfindingProject\Core\AstarPath.cs:1393
UnityEngine.Debug:LogError(Object)
AstarPath:ProcessGraphUpdatesAsync(Object) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:1398)
so the steps are:
1- I start the game with no grids at all.
2- I add a grid for the player to move with him after the game loads not instantly at awake or start
var graph = AstarPath.active.astarData.AddGraph(typeof(GridGraph)) as GridGraph;
then scan it:
AstarPath.RegisterSafeUpdate
(
delegate ()
{
playerGraph.ScanInternal();
//Make sure the above graph update is done now
AstarPath.active.FlushGraphUpdates();
}
);
//If you want to make sure the update is called directly instead of
//at the end of this frame or after a few frames.
AstarPath.active.FlushThreadSafeCallbacks();
3- then other graphs are added also by the method above.
4- the player graph moves with him using your grid mover script
5- the other graphs are moved by changing the center of the graph then call the same above scan
AstarPath.RegisterSafeUpdate
(
delegate ()
{
AstarPath.active.Scan();
//Make sure the above graph update is done now
AstarPath.active.FlushGraphUpdates();
}
);
//If you want to make sure the update is called directly instead of
//at the end of this frame or after a few frames.
AstarPath.active.FlushThreadSafeCallbacks();
Note:
I do not get any errors or any thing wrong except the error above but then everything is normal
So is there anything wrong am I doing?