Hi Aron!
After some dancing with adb I figured out that it all finally crashed in GraphCollision.Check() method. To be precise, in Physics.CheckCapsule():
position += up*collisionOffset;
switch (type) {
case ColliderType.Capsule:
// <-- "then it all crashes down..."
return !Physics.CheckCapsule (position, position+upheight,finalRadius,mask);
case ColliderType.Sphere:
return !Physics.CheckSphere (position, finalRadius,mask);
The interesting thing is that the Scan() method works ok one time in the beginning of the game. Everything crashes only on the second scan. As for values passed to the Physics.CheckCapsule(), they don’t seem suspicious to me, for example:
position: (-50.5, 0.0, -50.5)
position+upheight: (-50.5, 2.0, -50.5)
finalRadius: 0.5
Another thing I’ve noticed is that this node-scanning loop in GridGraph.ScanInternal() exectues ok during the first scan. But on the second scan it may crash when z==0 and x==0, x==1 or x==2.
for (int z = 0; z < depth; z ++)
{
for (int x = 0; x < width; x++)
{
GridNode node = nodes[z*width+x];
node.NodeInGridIndex = z*width+x;
UpdateNodePositionCollision (node,x,z);
}
}
So maybe it’s some kind of overflow, I really don’t know.
And yet another interesting thing is that it all works ok if I build it for Windows (desktop).
All this stuff is quite confusing, so I’ll appreciate any help.
P.S. As for your proposal to upgrade to version 3.6.8. After importing the package I got the following error message:
“Assets/AstarPathfindingProject/Core/AstarData.cs(162,82): error CS0246: The type or namespace name `LayerGridGraph’ could not be found. Are you missing a using directive or an assembly reference?”.
Looks like we have a layerGridGraph shortcut, but we don’t have the LayerGridGraph itself
So I had to comment a couple of “LayerGridGraph-related” lines. And finally - it didn’t help. Still we have a crash 