You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Mesh bounds not calculated on runtime import because MeshGenerator class calls GenerateMesh(),CreateMeshResultAsync which checks for "boundsAreValid". If they are then it never calls msh.RecalculateBounds() which means post-load the mesh does not have any relevant bounds (they are centre 0, size 0).
To Reproduce
View and debug the code as above for probably any glb (but can provide validated glb if required) - the mesh will end up with no bounds - only the submesh has bounds calculated
Describe the bug
Mesh bounds not calculated on runtime import because MeshGenerator class calls GenerateMesh(),CreateMeshResultAsync which checks for "boundsAreValid". If they are then it never calls msh.RecalculateBounds() which means post-load the mesh does not have any relevant bounds (they are centre 0, size 0).
To Reproduce
View and debug the code as above for probably any glb (but can provide validated glb if required) - the mesh will end up with no bounds - only the submesh has bounds calculated
Expected behavior
Any generated meshes should have RecalculateBounds() called on them.
See https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Mesh.SetSubMesh.html
It says "Note that this only applies to the bounds of the SubMesh. You must call Mesh.RecalculateBounds to recalculate the bounds of the Mesh itself."
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
LATEST 6.10
2022.3.41
builtin but NA
Editor NA
The text was updated successfully, but these errors were encountered: