Could ProceduralGraphMover be modified to handle GameObject destruction scenarios more gracefully?
When I unload a game map, I set ProceduralGraphMover.target to null. However, due to threading, code continues with stale references to target.
NullReferenceException: Object reference not set to an instance of an object
Pathfinding.ProceduralGraphMover.UpdateGraph (System.Boolean async) (at ./Library/PackageCache/com.arongranberg.astar@1f4b22f35e70/Utilities/ProceduralGraphMover.cs:167)
Pathfinding.ProceduralGraphMover.Update () (at ./Library/PackageCache/com.arongranberg.astar@1f4b22f35e70/Utilities/ProceduralGraphMover.cs:136)
Adding checks can make this class more robust to common scenarios, i.e. target is destroyed.
!if(target)
return