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

Resolved [SOLVED] Don't want local asset change in catalogue

Discussion in 'Addressables' started by noobogami, Aug 15, 2021.

  1. noobogami

    noobogami

    Joined:
    Jul 24, 2021
    Posts:
    43
    In my project chapters files is in addressable. first chapter is local and other chapters are remote. at some point my local chapter hash changed and after uploading catalogue on server previous builds game broke because for first chapter data it search asset in wrong bundle and couldn't find it.
    for example in my first addressable build, first chapter bundle name in catalogue was "Chapter_0_X" and after a month its name changed to "Chapter_0_Y" and previous builds encounter error: "Couldn't find bundle "Chapter_0_Y"".
    my local bundles are marked as "Can't change post release". is there a way that unity won't generate a hash for local bundles and search for assets in a bundle just according on bundle name?

    [SOLUTION]
    I updated my addressable package from 1.16 to 1.19 and it fixed! :\
    I hope it doesn't mess up something else because 1.16 was verified version.
     
    Last edited: Sep 6, 2021
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,444
    When you select an AssetGroup, you can set the
    Bundle Naming Mode
    to
    Filename
    . This should prevent Addressables from adding a hash to the bundle name.

    upload_2021-8-15_13-2-10.png
     
  3. noobogami

    noobogami

    Joined:
    Jul 24, 2021
    Posts:
    43
    I tried it before but then encounter this error for every bundle with this option:
    Exception encountered in operation Resource<IAssetBundleResource>(Android\testbundle_assets_all.bundle), status=Failed, result= : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/Android/Android\testbundle_assets_all.bundle'.

    it didn't load even once!
     
  4. LilMako17

    LilMako17

    Joined:
    Apr 10, 2019
    Posts:
    43
    I've run into the same issue previously and changing it to use Filename only, like in Peter's post, worked for me. Did you rebuild client/bundles after making the change? Just building a new catalog isn't going to work, as you need to generate new bundles with the new naming conventions after changing the Bundle Naming Mode.
     
  5. noobogami

    noobogami

    Joined:
    Jul 24, 2021
    Posts:
    43
    the bundle that mentioned in error was a new bundle to test this option and I rebuilt bundles but it didn't work.
     
    Last edited: Aug 17, 2021
  6. noobogami

    noobogami

    Joined:
    Jul 24, 2021
    Posts:
    43
    HEEEEEEEEEEEEEELP
    I tried it before posting here but it's not working!
    I created a new project but it won't load asset.
    here's my workflow:
    I created an empty new project,
    Created a prefab,
    created an empty packed asset bundle,
    then put prefab in that,
    in start of a script request to load the prefab
    built addressable bundles,
    built player and it loaded
    changed bundle naming mode to "File name"
    rebuilt addressable bundles
    built player and it didn't load
    cleaned addressable build
    rebuilt addressable bundles
    built player and same error.


    Error Unity Exception encountered in operation Resource<IAssetBundleResource>(Android\testbundle_assets_all.bundle), status=Failed, result= : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/Android/Android\testbundle_assets_all.bundle'.
    Error Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
    Error Unity
    Error Unity Exception encountered in operation Dependencies [Android\testbundle_assets_all.bundle...], status=Failed, result=System.Collections.Generic.List`1[UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle] : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/Android/Android\testbundle_assets_all.bundle'.
    Error Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
    Error Unity
    Error Unity Exception encountered in operation Resource<GameObject>(Addressable Asset.prefab), status=Failed, result= : Dependency Exception
    Error Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
    Error Unity
    Error Unity Exception encountered in operation ChainOperation<GameObject> - InitializationOperation, status=Failed, result= : ChainOperation of Type: UnityEngine.GameObject failed because dependent operation failed
    Error Unity Dependency Exception
    Error Unity (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
    Error Unity




    in editor with "Use Existing Build Asset bundles" option works but after so many changes to addressable setting I couldn't load asset in android.
     
    Last edited: Sep 6, 2021
  7. noobogami

    noobogami

    Joined:
    Jul 24, 2021
    Posts:
    43
    I updated my addressable package from 1.16 to 1.19 and it fixed! :\
    I hope it doesn't mess up something else because 1.16 was verified version.
     
  8. better_walk_away

    better_walk_away

    Joined:
    Jul 12, 2016
    Posts:
    291
    I have just encountered the same issue. The local bundle hashes changed for unknown reason after executing Update A Previous Build. I'm using 1.16.19, which is the latest "verified version". I know I can click the "Check For Content Update Restriction" beforehand, but if I do see the local changes, I still couldn't do anything. Moving the local assets to a newly created group isn't a realistic option, since it would transfer too many local bundles to a remote group and would require users to re-download it, which slows down the loading of the game for no apparent reason. Our product manager and game designers wouldn't accept this. Addressables should at least tell us the reason why the local bundles will be changed.
     
  9. noobogami

    noobogami

    Joined:
    Jul 24, 2021
    Posts:
    43
    after updating my addressable my problem solved and didn't see other issue with that version. I suggest to update your addressable to solve yours until see another issue