Define asset path with preload true at runtime

Is it possibe to add / exclude / define / override assets path at runtime with auto- preload?
For example I have 3 assets paths for high, medium and low resolution.
I want all of them to be in Export folder.
But when app starts I wish to preload only high, medium or low assets (depends or screen size).
Is it possible?
I can preload them manually, using manifest, but the problem is that text assets are npt cached :frowning:

Well ok, I can map preloaded texts to keep them cached.
The bad thing is that some libs use Assets.getText, so they should be preloaded and cached somehow…

Perhaps try using Assets.cache directly to populate the cache?

There is no method in cache to add text

You can extend the Assets class to cache texts too, I did it.

Many libs use Assets class. So my extended Assets will be usefull only in my project.

We did not add cached text because it was assumed that each get call it would be likely to modify the string and not actually want the same copy

I’d be open to adding at least support for Assets.cache.text (of some kind) to be available and respected

Open to feedback and contributions around this

But what happens when using preload true for texts in project.xml? They are cached somehow in this case

Not saying it’s a perfect system but currently the asset library has an internal cache when preloading that’s is different from the cached references in the higher level Assets class