Starling-Framework icon indicating copy to clipboard operation
Starling-Framework copied to clipboard

Unload specific folder assets

Open cgascons opened this issue 10 years ago • 2 comments

Hi, I'm using a custom loader / unloader for the assets on my app and I'm missing an "unloader by folder" function on the master branch of Starling. I thought it might be useful, this is what I'm using so far:

https://gist.github.com/cgascons/9e38038b289fcaec3c5b

cgascons avatar Sep 27 '13 07:09 cgascons

Thanks for sharing!

To add it to the master branch, the methods make a few assumptions that might not be true in all situations (e.g. people could use 'enqueueWithName' to give files a different than the default name). So I'd need to write it in a safer way.

However, you can use your code from a subclass, right?

Then I recommend you do just that for now. I'll leave the issue open, though, because this might be a nice feature for the future. (And people waiting for it can find and use your code simply, that way.)

PrimaryFeather avatar Sep 27 '13 08:09 PrimaryFeather

I see, makes sense! Will be waiting then! Thanks Daniel ;)

cgascons avatar Sep 27 '13 08:09 cgascons