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

Add Phaser.Loader.LoaderPlugin#removePack #6793

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samme
Copy link
Contributor

@samme samme commented Apr 12, 2024

This PR

Remove the resources listed in an Asset Pack.

This removes Animations from the Animation Manager, Textures from the Texture Manager, and all other assets from their respective caches. It doesn't remove the Pack itself from the JSON cache, if it exists there. If the Pack includes another Pack, its resources will be removed too.

@samme samme mentioned this pull request Apr 12, 2024
@samme samme marked this pull request as draft April 12, 2024 18:52
@tibimunteanu
Copy link

What is different for Spine assets? Are they managed by the Spine runtime?

@samme
Copy link
Contributor Author

samme commented Apr 25, 2024

It's add.spine() that adds to the "spineTextures" cache and the Texture Manager, and the Spine plugins prefix texture keys differently. So maybe the plugins could handle this better.

@samme samme force-pushed the feature/remove-asset-pack branch from 45fa467 to 252cb41 Compare April 26, 2024 16:16
@samme
Copy link
Contributor Author

samme commented Apr 26, 2024

Now removes all Spine assets.

@samme samme marked this pull request as ready for review April 26, 2024 16:18
@tibimunteanu
Copy link

Nice! When can we expect this to be merged?

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 this pull request may close these issues.

Unload asset pack
2 participants