DaemonBeast / Mitochondria

Among Us mod API
GNU General Public License v3.0
3 stars 1 forks source link

Cannot load same asset bundle from multiple `EmbeddedAssetBundleProvider`s #7

Open DaemonBeast opened 10 months ago

DaemonBeast commented 10 months ago

Attempting to load the same asset bundle from different instances of EmbeddedAssetBundleProvider results in the following error:

The AssetBundle 'IO.Stream' can't be loaded because another AssetBundle with the same files is already loaded.

This is due to the caching mechanism being isolated to each instance. https://github.com/DaemonBeast/Mitochondria/blob/14920e86a0bbd94303a392ae5bb83b271f79e8ff/Mitochondria/Framework/Resources/AssetBundles/EmbeddedAssetBundleProvider.cs#L29-L40

This can be fixed by having a shared caching system.