Cache runtime created assets

I have a game where players can create their own level. When they save it, I want to be able to compute some assets (bitmap 3D textures and so on…) for this level and store these localy so that I don’t have to recompute them each time I want to load the level. For official levels (not created by the players) however, assets are already computed by myself and embeded into the openfl app.
So, ideally, I am looking for a way to have an AssetsLibrary that mix assets from folders declared into project.xml (and embeded into the original openfl app) with assets stored into a local folder.
What is the best way to do this? Maybe I could directly save my runtime created assets into the assets folders declared into project.xml. Would it work? (if I have for example <assets path="Assets/images" rename="images"> in my project.xml, can I writte at runtime into this “images” assets folder and if so, what is is local path?)

1 Like

@Thomas_Bernard How did you solve it?

Assets.loadBitmapData(id, true)
or you can load with standard flash api loader and then add it to the cache.
Assets.cache.setBitmapData(id, bitmapdata);

1 Like