Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Asset Bundle Dependency Problem 5.5.1f1

Discussion in 'Asset Bundles' started by TitanUnity, Jan 27, 2017.

  1. TitanUnity

    TitanUnity

    Joined:
    May 15, 2014
    Posts:
    180
    I'm currently trying to migrate our project to Unity 5.5.1f1 from 5.4.3f1. Our current pipeline uses assets bundles with a basic dependency structure as follows:

    Characters:
    CharacterA.unity3d
    CharacterB.unity3d
    CharacterC.unity3d

    Shared Dependency:
    Characters.unity3d

    When I create bundles using a line like this in 5.4.3f1, everything works fine in game:
    Code (CSharp):
    1. BuildPipeline.BuildAssetBundles(path, BuildAssetBundleOptions.DeterministicAssetBundle, EditorUserBuildSettings.activeBuildTarget);
    However, in 5.5.1f1, this same build process seems to handle the dependency differently. Our bundle gets created without errors, but when I encounter 'Character A' using a bundle created from this flow, it hangs Unity and forces a hard close of the editor. If I modify the build flow and flatten this structure down and include all the dependencies from 'Characters.unity3d' directly into a single bundle 'CharacterA', everything works correctly. Unfortunately including these shared assets in each Character bundle would bloat all of our assets and isn't an option.

    My question is regarding any changes to Asset Bundle dependency management in the 5.5 versus 5.4? Does anyone have any ideas why this would suddenly break in 5.5? I experimented for about 8 hours and have yet to find a solution.

    This was also an issue in 5.5.0p4.
     
  2. TitanUnity

    TitanUnity

    Joined:
    May 15, 2014
    Posts:
    180
  3. TitanUnity

    TitanUnity

    Joined:
    May 15, 2014
    Posts:
    180