I don't know why the unload method was empty but now it clears all cached files when calling Assets.unloadLibrary("");

This commit is contained in:
Ludovic Bas
2023-06-06 15:51:01 +02:00
parent de7bf3e5ed
commit 76c76652cc

View File

@@ -611,7 +611,13 @@ class AssetLibrary
}
}
public function unload():Void {}
public function unload():Void {
cachedBytes.clear();
cachedFonts.clear();
cachedImages.clear();
cachedAudioBuffers.clear();
cachedText.clear();
}
@:noCompletion private function __assetLoaded(id:String):Void
{