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

Unload asset pack #6791

Open
tibimunteanu opened this issue Apr 11, 2024 · 1 comment · May be fixed by #6793
Open

Unload asset pack #6791

tibimunteanu opened this issue Apr 11, 2024 · 1 comment · May be fixed by #6793

Comments

@tibimunteanu
Copy link

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 like scele.load.unloadAssetPack(...) can be easy to implement, as it would just have to call destroy instead of load 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 or unload asset bundle or unload scene (which also unloads the assets).

@samme samme linked a pull request Apr 12, 2024 that will close this issue
@samme
Copy link
Contributor

samme commented Apr 12, 2024

Please try #6793

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

Successfully merging a pull request may close this issue.

2 participants