Search Unity

Question get the bundle name with hash to use in presigned url request

Discussion in 'Addressables' started by elfasito, Jul 9, 2021.

  1. elfasito

    elfasito

    Joined:
    Jul 4, 2017
    Posts:
    51
    Hello people.
    my remote bundles are saved with a hash appended to the filename (to manage updates).
    they are in a private bucket (aws s3), so to access to them I need to generate a presigned key for each bundle.

    the problem is I need to get the filename bundle to use in my presigned key function.

    but I cant figure out how do it.


    example:
    *scene bundle name: addressablescenetest.unity << this is the name in the editor
    *scene bundle name+hash: addressablescenetest.unity_0966950c818b4832a0bc1b17f32f4ecc <<but this is what I need to generate the presigned url.

    is there any method for get the bundle name + hash?.

    or maybe Im doing a wrong approach?.
     
  2. tylo

    tylo

    Joined:
    Dec 7, 2009
    Posts:
    154
    In the folder
    AssetGroupTemplates
    is a
    Packed Assets
    file.

    If you click that, and in the Inspector expand the Advanced Options there should be a dropdown called
    Bundle Naming Mode
    that will allow you to append the Hash to the end of your bundle's name when building bundles.
     
  3. elfasito

    elfasito

    Joined:
    Jul 4, 2017
    Posts:
    51
    Hello, I know how append a hash to the filename, but I need to get the bundle filename (with hash) on runtime, for use in my presigned url function
     
    Last edited: Jul 10, 2021