Can't be loaded because another AssetBundle with the same files is already loaded

android picture android · Oct 14, 2017 · Viewed 10.8k times · Source

I want to play the video in AR camera. Totally I have 10 videos and one videoplayer. And I am downloading the video player from the server as an asset bundle with name videoplayer.unit3d and storing into sd card. when I am scanning the imageTarget I am reading the video asset bundle file using AssetBundle.LoadFromFile() function and for the first time its working fine.

If I scan the second imageTarget it is showing following error

"Can't be loaded because another AssetBundle with the same files is already loaded"

I have tried a bundle.Unload(true); and Caching.cleanchache() but its not working throwing same error. Also tried bundle.Unload(false);

Answer

android picture android · Oct 19, 2017

I have found the answer, After Instantiate the Gameobject just call bundle.Unload(false); it solved my problem.