Hey there,
i currently dont know how to prevent the error “The AssetBundle 'pathToAssetBundle/bundle can’t be loaded because another AssetBundle with the same files is already loaded.”.
Im using the following routine everytime i need to access a videoclip out of this bundle:
UnityWebRequest www = UnityWebRequest.GetAssetBundle(bundleURL, 0, 1983471844);
// wait for load to finish
yield return www.Send();
if (www.error != null)
{
Debug.LogError("www error: " + www.error);
www.Dispose();
www = null;
yield break;
}
// get bundle from downloadhandler
bundle = ((DownloadHandlerAssetBundle)www.downloadHandler).assetBundle;
“1983471844” is the CRC number out of the bundle.manifest file and i tried to use something like:
if (!Caching.IsVersionCached("bundle", Hash128.Parse("1983471844")))
{
Debug.Log("AssetBundle not yet cached");
StartCoroutine(LoadAssetBundleCoroutine("pathtoAssetBundle/bundle"));
return;
}
But that always returns false and doesnt seem to work.
What exactly am i doing wrong or is there another better way of doing so?