Won't fix Can't load different assetbundles from the AssetBundle loader

hazmhox

Moderator
Featured Contributor
Messages
926
Reactions
5,874
Points
123
There is a bug when you try from code, to load two different assetbundles for the same handle in a same script on two different Person atoms.
If you load the exact same bundle it works.

How to reproduce :
  • Get Life 10 ( https://hub.virtamate.com/resources/life.165/ ), open the var file and extract the audiobundle file.
  • Rename the extracted file to another name let's say test.audiobundle
  • Open VAM
  • Create a new scene with two characters
  • Add life 10 on each character.
  • On one of the character, open the custom UI of the breath module
  • Select your extracted and renamed audiobundle in the audio bundle section
assetbundle-01.png


You should have an error immediately "invalid assetbundle". If it's not the case :
  • Save the scene
  • reload the scene
  • You should have the error
If you don't load another bundle, you'll notice that it works perfectly.
 
I've had this error before specifically with Life, I thought it was something on my side. Nice repro.
 
This looks like something I can't fix. I ran inside Unity and it produces another error that gives the clue:

The AssetBundle 'MyBreathing2.audiobundle' can't be loaded because another AssetBundle with the same files is already loaded.

The issue is if you make a copy of an assetbundle and try to load that after loading the original, it won't let you because it considers them to contain replicated files. It should allow loading unique bundles without issue. You just can't load 2 different versions of the same source bundle.

This can also be replicated using CustomUnityAsset by making a copy of an existing assetbundle to a different name and then trying to load it along with the original. This just seems to be a restriction of Unity's assetbundle system. I don't know how it determines the conflict, but the error suggests that file paths and/or the file signature (size, checksum, etc.) may be involved in the determination. In any case, it doesn't look fixable.
 
Umh ok, just like MacGruber was saying on the other thread... and in my case with VAMM ?

I had two different assetbundles ( one containing the datas from Ella, the other datas from Isabella so the checksum is obviously different ), with the same name ( voice.voicebundle ) but in a different folder / path. If the filename is the same it triggers the error too even on different path and different checksum ?
 
I don't know the answer. Unity clearly has some conflict avoidance code but it isn't clear how it works. If you want you can PM me the 2 assetbundles and I can debug in Unity editor to see if it is the same or not.
 
The errors I'm seeing are internally from within Unity's own asset load system during call to AssetBundle.LoadFromFileAsync(path)


You could probably try this out yourself by taking an existing assetbundle, making a copy, and try to call this function above on both in sequence
 
Back
Top Bottom