engine
engine copied to clipboard
Asset.ready() event is called incorrectly when loading assets that are inside a container
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
- subscribe to mesh asset ready
- subscribe to container asset ready
- start loading mesh asset
- mesh ready callback is called immediately, .resource.meshes variable is null inside the mesh asset, but the asset is marked as loaded
- container asset is loaded
- container ready is called
- mesh asset now has meshes
mesh asset ready() should be called only when an actual container is loaded
@slimbuck Is this something you're familiar with?
Can confirm render assets fire ready immediately instead of waiting for container ready, but don't see an immediate simple fix.