- A* version: 5.2.4
- Unity version: 2022.3.47
I have an agent that’s pathfinding using FollowerEntity and AIDestinationSetter to navigate a 2D plain using a grid graph and local avoidance. The AIDestinationSetter target is set at runtime and the FollowerEntity will move and follow the target fine, but as the target moves and the path gets repaired the following exception will sometimes get thrown seemingly at random and the agent will stop moving. I’m not using any components to move the agent, only the movement done automatically by the FollowerEntity component.
AssertionException: Assertion failure. Value was False
Expected: True
UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <50e5acd061cd4a73b7fc8eecbf07e915>:0)
UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) (at <50e5acd061cd4a73b7fc8eecbf07e915>:0)
UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition) (at <50e5acd061cd4a73b7fc8eecbf07e915>:0)
Pathfinding.PathTracer.LocalSearch (Pathfinding.GraphNode currentNode, UnityEngine.Vector3 point, System.Int32 maxNodesToSearch, Pathfinding.Util.NativeMovementPlane movementPlane, System.Boolean reverse, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1044)
Pathfinding.PathTracer.RepairFull (UnityEngine.Vector3 point, System.Boolean isStart, Pathfinding.PathTracer+RepairQuality quality, Pathfinding.Util.NativeMovementPlane movementPlane, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:838)
Pathfinding.PathTracer.Repair (UnityEngine.Vector3 point, System.Boolean isStart, Pathfinding.PathTracer+RepairQuality quality, Pathfinding.Util.NativeMovementPlane movementPlane, Pathfinding.ITraversalProvider traversalProvider, Pathfinding.Path path, System.Boolean allowCache) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:650)
Pathfinding.PathTracer.SetPath (System.Collections.Generic.List`1[T] parts, System.Collections.Generic.List`1[T] nodes, UnityEngine.Vector3 unclampedStartPoint, UnityEngine.Vector3 unclampedEndPoint, Pathfinding.Util.NativeMovementPlane movementPlane, Pathfinding.PathRequestSettings pathfindingSettings, Pathfinding.Path path) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1961)
Pathfinding.PathTracer.SetPath (Pathfinding.ABPath path, Pathfinding.Util.NativeMovementPlane movementPlane) (at ./Packages/com.arongranberg.astar/Utilities/PathTracer.cs:1920)
Pathfinding.ECS.ManagedState.SetPath (Pathfinding.Path path, Pathfinding.ECS.ManagedState state, Pathfinding.ECS.AgentMovementPlane& movementPlane, Pathfinding.ECS.DestinationPoint& destination) (at ./Packages/com.arongranberg.astar/Core/ECS/Components/ManagedState.cs:122)
UnityEngine.Debug:LogException(Exception)
Pathfinding.ECS.ManagedState:SetPath(Path, ManagedState, AgentMovementPlane&, DestinationPoint&) (at ./Packages/com.arongranberg.astar/Core/ECS/Components/ManagedState.cs:132)
Pathfinding.ECS.JobRepairPath:Execute(LocalTransform&, MovementState&, AgentCylinderShape&, AgentMovementPlane&, DestinationPoint&, EnabledRefRW`1, ManagedState, MovementSettings&, NativeList`1, NativeArray`1&, Allocator, Boolean) (at ./Packages/com.arongranberg.astar/Core/ECS/Jobs/JobRepairPath.cs:152)
Pathfinding.ECS.JobRepairPath:Execute(ArchetypeChunk&, Int32, Boolean, v128&) (at ./Packages/com.arongranberg.astar/Core/ECS/Jobs/JobRepairPath.cs:123)
Pathfinding.ECS.JobRepairPath:Unity.Entities.IJobChunk.Execute(ArchetypeChunk&, Int32, Boolean, v128&)
Unity.Entities.JobChunkProducer`1:ExecuteInternal(JobChunkWrapper`1&, IntPtr, JobRanges&, Int32) (at ./Library/PackageCache/com.unity.entities@1.3.5/Unity.Entities/IJobChunk.cs:420)
Unity.Entities.JobChunkProducer`1:Execute(JobChunkWrapper`1&, IntPtr, IntPtr, JobRanges&, Int32) (at ./Library/PackageCache/com.unity.entities@1.3.5/Unity.Entities/IJobChunk.cs:363)