Error log,
IndexOutOfRangeException: Index was outside the bounds of the array.
Pathfinding.PathHandler.GetPathNode (Pathfinding.GraphNode node) (at Assets/AstarPathfindingProject/Core/PathHandler.cs:196)
AstarPath+<>c__DisplayClass97_0.<RecalculateDebugLimits>b__0 (Pathfinding.GraphNode node) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:721)
Pathfinding.PointGraph.GetNodes (System.Action`1[T] action) (at Assets/AstarPathfindingProject/Generators/PointGenerator.cs:172)
AstarPath.RecalculateDebugLimits () (at Assets/AstarPathfindingProject/Core/AstarPath.cs:715)
AstarPath.OnDrawGizmos () (at Assets/AstarPathfindingProject/Core/AstarPath.cs:788)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
This happens when a node is destroyed dynamically with node.Destroy().
I only ever call this inside of AstarPath.active.AddWorkItem() or GraphModifier OnPostScan/OnGraphsPostUpdate.
- Create node
- Draw gizmos
- node.Destroy()
- Error