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

Asset.ready() event is called incorrectly when loading assets that are inside a container #6876

Open
OlegGedzjuns opened this issue Aug 6, 2024 · 2 comments

Comments

@OlegGedzjuns
Copy link
Contributor

When loading a mesh asset inside a glb container .ready() callback on the mesh asset is called immediately, not waiting for the container asset to be loaded.

https://playcanvas.com/project/1242313/overview/incorrect-ready-on-loading
launch, check the console for logs

  1. subscribe to mesh asset ready
  2. subscribe to container asset ready
  3. start loading mesh asset
  4. mesh ready callback is called immediately, .resource.meshes variable is null inside the mesh asset, but the asset is marked as loaded
  5. container asset is loaded
  6. container ready is called
  7. mesh asset now has meshes

mesh asset ready() should be called only when an actual container is loaded

@willeastcott
Copy link
Contributor

@slimbuck Is this something you're familiar with?

@slimbuck
Copy link
Member

slimbuck commented Aug 8, 2024

Can confirm render assets fire ready immediately instead of waiting for container ready, but don't see an immediate simple fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants