Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug AssetBundle lose dependency, feature or bug?

Discussion in 'Asset Bundles' started by Jamesika, Jul 6, 2023.

  1. Jamesika

    Jamesika

    Joined:
    May 13, 2017
    Posts:
    5
    Test cases:
    [X] ScriptableObject references GameObject => NO Dependency
    [O] ScriptableObject references ScriptableObject => Exist Dependency
    [O] GameObject references GameObject => Exist Dependency
    [O] GameObject references ScriptableObject => Exist Dependency

    Both unity versions have same bug:
    2022.3.0f1c1
    2023.1.0f1c1
     

    Attached Files:

  2. AndrewSkow

    AndrewSkow

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    78
    In the code you posted there are 5 bundles, how does that correspond to the 4 test cases you are talking about? E.g. which one is not exhibiting the behavior that you expect?
     
  3. Jamesika

    Jamesika

    Joined:
    May 13, 2017
    Posts:
    5
    For example, ScriptableObjectA references GameObjectB,
    But BundleA hasn't dependency to BundleB

    ScrptableObjectA also references to ScritableObjectC,
    So BundleA has dependency to BundleC
    upload_2023-7-8_23-27-57.png
    upload_2023-7-8_23-29-14.png
     
  4. AndrewSkow

    AndrewSkow

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    78
    Thanks for explaining your repro projects. This does appear to be a bug.

    When built with the newer implementation of AssetBundle building in 2023 (Multi-Process option) the dependency works properly.

    Info_1:
    Name: bundlea
    Dependencies:
    Dependency_0: bundleb
    Dependency_1: bundlec

    But with the older implementation it is missing

    Info_1:
    Name: bundlea
    Dependencies:
    Dependency_0: bundlec

    The AssetBundleManifest object inside "bundles" is also incorrect.

    However the BundleA actually does have the dependency recorded, e.g. the link to the prefab is not lost. So if BundleB is loaded then loading bundleA should work. That means that this is a bug at the level of the older dependency tracking / manifest creation.

    Please open a bug report with your project, you can link to this forum post. Thank you.
     
  5. AndrewSkow

    AndrewSkow

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    78