Search Unity

Switch the AddressableAssetSettings Profile at runtime?

Discussion in 'Addressables' started by KHUnity7, Sep 26, 2019.

  1. KHUnity7

    KHUnity7

    Joined:
    Feb 27, 2018
    Posts:
    3
    I cannot find a way for the standalone app runs from outside the editor to chose a specific profile(tried to set the AddressableAssetSettingsDefaultObject.activeProfileId in the build script, but it doesnot have any effect). It always go back to the "Default" profile.

    Is there a way to chose or setup profile at runtime?

    Thanks for any help in advance.
     
    Last edited: Sep 26, 2019
  2. KHUnity7

    KHUnity7

    Joined:
    Feb 27, 2018
    Posts:
    3
    Actually the problem I am having right now is, I haven't managed to get my Win64 standalone app to use the online packages which is working for editor(Windows), thought it was a problem for default profile. But even after forcing every profile to use RemoteLoadPath(https), still failing on load the bundle, with an error message like:

    Exception encountered in operation Resource<IAssetBundleResource>(defaultlocalgroup_assets_all_85ddc3f7afc8ef42572443eb804c7a26.bundle): Invalid path in AssetBundleProvider: '3e0b9ecc5cb985b44b745dcbdf342bcf/defaultlocalgroup_assets_all_85ddc3f7afc8ef42572443eb804c7a26.bundle'.
     
  3. DADA_universe

    DADA_universe

    Joined:
    Mar 14, 2015
    Posts:
    38
    Got same problem, no clear means of debugging this and nothing found online.
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hey, no you aren't able to change the Profile at runtime. That has information that's baked into the build.

    @KHUnity7 that path doesn't look like an endpoint for a remote bundle. Are you sure your profile is setup to use the correct remote load and build path? And that build remote catalog is turned on? You say it works in the Editor, what playmode script are you using?

    Also, what version of the package are you using?
     
  5. DoPinG83_CarX

    DoPinG83_CarX

    Joined:
    May 4, 2021
    Posts:
    3
    Is there way to change RemoteLoadPath at runtime? For example: I want to use different CDNs in different countries. So I would like to change Profile itself or its RemoteLoadPath depending on device location. Is that possible somehow? Our addressables version is 1.19.19
     
  6. ScottJame

    ScottJame

    Joined:
    Dec 11, 2017
    Posts:
    5