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
Unload asset pack #6791
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The loader plugin can currently load all assets from an asset-pack via
scene.load.pack(...)
, but it lacks the functionality for unloading an asset-pack.Since the
pack
function must already have the code to read and iterate through assets in an asset-pack, maybe something likescele.load.unloadAssetPack(...)
can be easy to implement, as it would just have to calldestroy
instead ofload
for each asset in the asset-pack.Motivation:
Building multi-scene games for mobile with lots of assets can be difficult to do without this, as it requires the developer to track every asset it loads and manually and individually unload it when needed. This is almost like managing an asset-pack manually and it kind of defeats the purpose of the builtin asset-pack.
Pretty much all game engines support something along the lines of
unload unused assets
orunload asset bundle
orunload scene (which also unloads the assets)
.The text was updated successfully, but these errors were encountered: