Hi there!
I’m getting some exceptions during navmesh generation: "Tiles are not adjacent (neither x or z coordinates match)"
and "Tiles are not adjacent (tile coordinates must differ by exactly 1. Got '" + t1coord + "' and '" + t2coord + "')"
in NavmeshBase -> ConnectTiles(...)
method.
The values t1coord
and t2coord
are always miscalculated by one. For example, it’s TileA (TA): x1 = 30, z1 = 70; TileB (TB): x2 = 30, z2 = 70
(where x1 should be probably 29, because the tile before TA has values x = 28, z = 70).
It happens only on PlayStation 4 and PlayStation 5. The error isn’t deterministic - values passed in error are different every now and then for the same scene loaded. Also, it doesn’t happen with 100% reproduction. But when the error occurs, it might crash navmesh generation.
I’m using Unity 2020.3.27f1, A* version 4.3.47.
Recast navmesh is generated with astarPath.ScanAsync(...)
method which then goes to ScanAllTilesBurst(...)
. I believe it’s important because when I went back to scanning without Unity Jobs system, the error disappeared (but loading time skyrocketed 10-20 times). Unity Jobs package used in project is 0.7.0-preview.17
(required by used A* version). I tried a build with the newest version of Jobs (0.50.0-preview.8
) - the same error happened.
I’ve tried debugging the issue but due to parallel computations it’s quite hard to find any useful information. I believe the issue results in failure in ConnectTiles(...)
method, but the core of the error is somewhere in a creation of the tiles. The code seems to be correct though.
Does anyone have any clues where should I find the solution for the problem?