Unity-Technologies / Addressables-Sample

Demo project using Addressables package
1.31k stars 299 forks source link

ADDR 949 SyncBundleProvider never actually releases bundles #35

Closed kirstenpilla closed 4 years ago

kirstenpilla commented 4 years ago

https://jira.unity3d.com/browse/ADDR-949

Issue https://github.com/Unity-Technologies/Addressables-Sample/issues/19: SyncBundleProvider.Release will call parent AssetBundleProvider.Release, which fails to cast SyncAssetBundleResource as a AssetBundleResource. This occurs because while SyncBundleProvider inherits from AssetBundleProvider, SyncAssetBundleResource doesn't inherit from AssetBundleResource— they are two entirely separate classes. As a result, SyncBundleProvider never actually releases bundles.

BundleProviders are only being used during packed mode (Use Existing Groups).

Fix: Used user provided custom Release() and Unload() with minor tweaks.