Implements a shared caching system for AssetBundle instances in EmbeddedAssetBundleProvider to prevent errors when loading the same asset bundle from multiple instances.
Introduces a static Dictionary<string, AssetBundle> to keep track of loaded AssetBundle instances by their names, ensuring that each bundle is loaded only once across all instances of EmbeddedAssetBundleProvider.
Modifies the Load method to first check the static dictionary for an existing AssetBundle before attempting to load a new one, effectively using the shared cache.
Adjusts the CoLoad coroutine method to also check the static dictionary for a cached AssetBundle before loading, and upon successful asynchronous loading, the loaded bundle is added to the shared cache.
Ensures that when an AssetBundle is loaded, either synchronously or asynchronously, it is added to the static dictionary, preventing duplicate loads and eliminating the error when attempting to load the same asset bundle from different instances.
Related to #7
Implements a shared caching system for
AssetBundle
instances inEmbeddedAssetBundleProvider
to prevent errors when loading the same asset bundle from multiple instances.Dictionary<string, AssetBundle>
to keep track of loadedAssetBundle
instances by their names, ensuring that each bundle is loaded only once across all instances ofEmbeddedAssetBundleProvider
.Load
method to first check the static dictionary for an existingAssetBundle
before attempting to load a new one, effectively using the shared cache.CoLoad
coroutine method to also check the static dictionary for a cachedAssetBundle
before loading, and upon successful asynchronous loading, the loaded bundle is added to the shared cache.AssetBundle
is loaded, either synchronously or asynchronously, it is added to the static dictionary, preventing duplicate loads and eliminating the error when attempting to load the same asset bundle from different instances.