Search Unity

Question Troubleshooting "another AssetBundle with the same files is already loaded" error

Discussion in 'Asset Bundles' started by imtzo, Aug 15, 2022.

  1. imtzo

    imtzo

    Joined:
    Dec 16, 2018
    Posts:
    5
    I've created two asset bundles which I believe have completely different contents, yet when I load them the first one loads and I get the following error for the second one:

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

    I've viewed the contents using the AssetBundle Browser and the only suspicious items I can find are the "Universal Render Pipeline/Lit" and "Hidden/Universal Render Pipeline/Fallback Error" shaders. Could this be the problem?

    The asset bundles were built individually using the following command:

    Code (CSharp):
    1. BuildPipeline.BuildAssetBundles(directory, buildMap,
    2.     BuildAssetBundleOptions.ForceRebuildAssetBundle
    3.     | BuildAssetBundleOptions.DeterministicAssetBundle
    4.     | BuildAssetBundleOptions.UncompressedAssetBundle
    5.     | BuildAssetBundleOptions.StrictMode,
    6.     buildTarget);
    The buildMap contains one prefab item. The bundles are built individually because this is intended to be part of a modding system.

    Any ideas – things to check? Ways to get a more descriptive error message?

    Thanks!

    Unity 2021.3.8f1, macOS 12.5
     
  2. imtzo

    imtzo

    Joined:
    Dec 16, 2018
    Posts:
    5
    Ran another test with very simple-but-similar elements:

    1. Created sphere and cube prefabs, built two bundles individually containing only those prefabs. (AssetBundle Browser views of those in image below)
    2. Tried loading them. Same console error message, second bundle doesn't load.
    3. Also tried building the bundle in another Unity project altogether. Same result.

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

    SphereCube.png