Add easy way to load source assets rather than exported assets
This is becoming a very common request, people want to directly load the source assets rather than the exported assets, usually for dev purposes. For instance, it's easier to edit an asset and rerun the program (or clear the cache and reload assets) rather than recompiling the entire game every time you change an asset.
I'm proposing some sort of way to override the asset loader:
FlxG.assets.customLoadFunction = function(id:String, type:lime.utils.AssetType, useCache:Bool):Dynamic
{
if (MyGameVars.useManifest)
return lime.utils.getAsset(id, type, useCache);
return MyGameUtils.loadFileFromDirectory(pathToSpecialDirectory, id, type, useCache);
}
might also need some way for async loading vs sync loading. openfl asset utils typically have a getText and a loadText function
Is there even an assets field in FlxG? I don't remember seeing something like that, and it would be probably better to add those in FlxAssets
Is there even an
assetsfield inFlxG?
there is not, currently
it would be probably better to add those in
FlxAssets
this statement directly conflicts with the point of #2951