-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
AssetListLoader should load dependencies for all asset types #7345
Comments
Perhaps a third option a more simple way of getting actual dependencies, something like: const related = asset.getRelated(); That way you can provide a full list to AssetListLoader. The reason why |
That would definetly make loading of dependencies easier! However I do advocate for some API where I can pass in an asset and it loads all dependencies as well. I don't really want to do that manually as this can be generalized. Could be a new method like |
|
I didn't think about unloading! But that's a valid use case as well. I mostly never unload as my scenes are pretty small. I've seen the examples where tagging is used to define which assets are loaded. However I'm not a big fan of this, as this involves manual setup, which introduces human errors. I do like your idea of |
Currently AssetListLoader is only loading dependencies of asset type
model
.engine/src/framework/asset/asset-list-loader.js
Lines 144 to 153 in c5ee869
engine/src/framework/asset/asset-list-loader.js
Lines 112 to 114 in c5ee869
My use case:
When switching between scenes I want to use the AssetListLoader to preload all assets and show a progress bar.
I parse the scene and create a list of all assets which need to be loaded.
Let's say the scene contains a render component. When loading the render component the glb won't be loaded with it.
This results in pop in, when changing the scene.
There are multiple asset types, where this problem occurs:
There are 2 solutions to this problem:
The text was updated successfully, but these errors were encountered: