PathFinding doesn't work on empty tiles for isometric maps

  • A* version: [5.3.7]
  • Unity version: [6.0.41f1]

I’m trying to build a RTS game which has a standard isometric tiles and a rect map.

I have to set a larger size for the path finding grid for my map (see the picture above), when trying to scan the grid, the error code takes me here.

I could work around to finish my demo first, such as put some transparent tiles on my map, but I was wondering what is the best practice for my case.

Thanks.

I got the errors below:
the call stack:

stack1:

AssertionException: Assertion failure. Value was False
Expected: True
Pathfinding.AstarPathEditor.MenuScan () (at ./Packages/com.arongranberg.astar/Editor/AstarPathEditor.cs:1381)
Pathfinding.AstarPathEditor+<>c__DisplayClass73_0.b__0 () (at ./Packages/com.arongranberg.astar/Editor/AstarPathEditor.cs:826)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:384)

stack2:
There was an error generating the graphs:
UnityEngine.Assertions.AssertionException: Assertion failure. Value was False
Expected: True
at UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) [0x0003c] in /Users/bokken/build/output/unity/unity/Runtime/Export/Assertions/Assert/AssertBase.cs:29
at UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) [0x00009] in /Users/bokken/build/output/unity/unity/Runtime/Export/Assertions/Assert/AssertBool.cs:20
at UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition) [0x00009] in /Users/bokken/build/output/unity/unity/Runtime/Export/Assertions/Assert/AssertBool.cs:13
at Pathfinding.Jobs.JobDependencyTracker.Dispose () [0x00001] in ./Packages/com.arongranberg.astar/Utilities/JobDependencyTracker.cs:447
at Pathfinding.Jobs.JobDependencyTracker.ClearMemory () [0x00010] in ./Packages/com.arongranberg.astar/Utilities/JobDependencyTracker.cs:459
at Pathfinding.GridGraph+GridGraphUpdatePromise+d__22.MoveNext () [0x0146d] in ./Packages/com.arongranberg.astar/Graphs/GridGraph.cs:1988
at AstarPath+d__131.MoveNext () [0x000ef] in ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1965
at AstarPath+d__130.MoveNext () [0x004b7] in ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1820
at AstarPath+d__128.MoveNext () [0x00060] in ./Packages/com.arongranberg.astar/Core/AstarPath.cs:1690
at Pathfinding.AstarPathEditor.MenuScan () [0x0008e] in ./Packages/com.arongranberg.astar/Editor/AstarPathEditor.cs:1366

If you think this is a bug, please contact me on forum.arongranberg.com (post a new thread)

UnityEngine.Debug:LogError (object)
Pathfinding.AstarPathEditor:MenuScan () (at ./Packages/com.arongranberg.astar/Editor/AstarPathEditor.cs:1379)
Pathfinding.AstarPathEditor/<>c__DisplayClass73_0:b__0 () (at ./Packages/com.arongranberg.astar/Editor/AstarPathEditor.cs:826)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:384)

I dig it a little this morning, it looks that as long as using a isometric grid size bigger than 22, for example set size to 23, it will throw an exception in those 2 places:

GridGraphUpdatePromise.Prepare 				
dependencyTracker.ClearMemory();
GridGraphUpdatePromise.Apply()
ctx.DirtyBounds(graph.GetBoundsFromRect(new IntRect(writeMaskBounds.min.x, writeMaskBounds.min.z, writeMaskBounds.max.x - 1, writeMaskBounds.max.z - 1)));
Dispose(); 

Nice find-- I’ll go ahead and tag aron here too so he can take a look. Looks like a bug from what I’m seeing :+1:

Hi

Do you think you can see if anything changes if you upgrade your collections and burst packages to the latest versions?

Hi aron,

I updated the packages, the errors are not missing.

Tell me if you need help to reproduce the problem, do i need upload a sample project or something.

BTW, the problem also exists on Windows platform.

I just thought I should mention (on the off chance it helps narrow down any issues aron is trying to find to fix the issue) that with a* 5.3.7 and an isometric grid graph with a width/depth of 256 on unity 6000.0.34f1, the scanning works for me

1 Like

Thank you, I rechecked my A* version, it’s 5.1.6!!!

I upgraded my A* version to 5.3.7, everything works well!!!

Sorry for the inconvenience I made.

The guys who post this thread the other day must have lost his mind in the jungle.

1 Like