I think I have found where the problem is: it looks like I can use Assets.loadBitmapData and get the image data later with getBitmapData as if it was embedded, because cache works correctly for images (well, it is a parameter of the function ), but NOT for XML files: loadText has no parameter āuseCacheā, so I canāt preload it to use later.
I think the fix is pretty easy, but I should have a look at how cache works.
EDIT: Ah! In Assets.hx - AssetCache I see
bitmapData = new Map<String, BitmapData> ();
font = new Map<String, Font> ();
sound = new Map<String, Sound> ();
ā¦this means that XMLs cannot be cached?! Neither lime.Assets caches XMLs!
What about adding
text = new Map<String, String> ();
?
EDIT2: looking at lime.Assets: seems like xml files MUST be cached.
EDIT3: openfl.Assets modified to allow text caching! Now I have a local cache in singleton openfl.Assets.hx for texts too! Ignoring lime.Assets ācacheā.