Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh bounds not calculated on runtime import #27

Closed
andypoly opened this issue Jan 7, 2025 · 2 comments
Closed

Mesh bounds not calculated on runtime import #27

andypoly opened this issue Jan 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@andypoly
Copy link

andypoly commented Jan 7, 2025

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):

  • glTFast version
    LATEST 6.10
  • Unity Editor version [e.g. 2021.2.1f1]
    2022.3.41
  • Render Pipeline and version [e.g. Universal Render Pipeline 12.0]
    builtin but NA
  • Platform: [e.g. Editor, Windows Player, iOS]
    Editor NA
@atteneder
Copy link
Collaborator

A hotfix is scheduled for 6.10.1

@atteneder
Copy link
Collaborator

fixed in 6.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants