- Home /
Errors When Loading AssetBundles With Concurrent WWW Calls (Unity5)
Hello,
When loading asset bundles with www calls I am getting several errors:
Which goes along with this error in the console:
Closing file : : mem:/UnityWebStream-15/__lock
The following error only occurs when loading asset bundles containing materials.
The AssetBundle 'file://C:\TestLoading\Assets\Bundles\material.pc' can't be loaded because it was not built with the right version or build target.
UnityEngine.WWW:get_assetBundle()
<LoadMaterial>c__Iterator2:MoveNext() (at Assets/Scripts/Loader.cs:71)
The errors only occur when attempting to load more than one bundle at a time. They errors also happen inconsistently, but happen more frequently the more objects you are trying to load simultaneously. Having to load a single bundle at a time is not ideal since it increases loading time.
I created a test project that causes the errors. It contains 3 asset bundles and attempts to load them simultaneously. The first two bundles are game objects that are instantiated. After they are created a material is loaded and assigned to the objects.
To run the example load the main scene and press play. There is an option on the "Loader" component on the object called "Main" to only load one bundle at a time. If this is checked the error does not occur.
Has anyone dealt with these errors, and were you able to find a solution that gives you the benefit of being able to load more than one object at a time?
Thank you for your help.
i have same error but sometimes work i dont know why, looks like Unity bug or somethings