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

Question Where is the Addressables hosting path coming from?

Discussion in 'Addressables' started by Peter77, Jun 3, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,444
    TLDR; I found no way to configure the "Hosting" path, where is it coming from?

    I'm using Unity 2019.4.20f1, Addressables 1.18.2 and build for Android.

    I'm following the "Assets Hosting Services" documentation to set up local hosting or "Editor Hosted" how it's called in the documentation:
    https://docs.unity3d.com/Packages/c...ddressableAssetsHostingServices.html#overview

    When I follow the documentation it doesn't work, all load requests end up with a "RemoteProviderException : Unable to load asset bundle / HTTP/1.1 404 Not Found".

    After several hours of connection issues and trial&error, I found a combination that works, but there is a magic hosting path that I don't understand where it's coming from.

    When I activate the Local Hosting service, Addressables outputs the following folder where things are hosted:
    Hosting : EditorHostedServerData/Android


    upload_2021-6-3_9-31-41.png

    I've specified
    EditorHostedServerData
    in the Addressables Profile window, but the
    /Android
    suffix is magically added.

    This is the configuration found in the documentation (except I use EditorHostedServerData rather than just HostedData):
    upload_2021-6-3_9-34-0.png

    The above LocalLoadPath and RemoteLoadPath don't work, they cause "file not found".


    I have to remove
    /[BuildTarget]
    from the paths to make it work:
    upload_2021-6-3_9-37-55.png

    The reason for it seems to be the hosting service points to "EditorHostedServerData/Android", rather than just "EditorHostedServerData" and the Local&RemoteLoadPath looks for an Android folder, so requests ultimately end up in "EditorHostedServerData/Android/Android".

    For example I changed the BuildPath to "EditorHostedServerData/foo" and rebuild, but the hosting service keept using "EditorHostedServerData/Android".

    I found no way to configure the "Hosting" path, so where is it coming from?
     
  2. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    I have the same problem, I couldn't find a proper solution to solve this but removing all folders generated by addressables and reimport/regenerate everything.

    This is extremely annoying and i hope they will fix it soon.
     
  3. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,796
    I'll ping the team for some insight.
     
    Peter77 likes this.
  4. unity_krista

    unity_krista

    Unity Technologies

    Joined:
    Apr 28, 2020
    Posts:
    40
    In looking into this, I found there's a couple bugs with setting the hosting service paths. For the one you've described, the hosting service path is coming from the group's build path BUT it isn't updating it when that path is updated. So when you first create the hosting service, it has a default value, then when you first enable it, it takes the build path as the hosting path, but will never update it. Created a ticket for the bug. It's by no means ideal, but as a quick workaround in the meantime you could try deleting and recreating the hosting service when you make a build path change.
     
    FarrukhNiaz1100 and Peter77 like this.
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,444
    Thank you for the reply and workaround.

    Please allow me to suggest to add a text-field to the Hosting Service GUI that allows to enter where those files are stored. The text-field should also be able to interpret those {} and [BuildTarget] etc variables. This is easy to understand then.
     
  6. unity_krista

    unity_krista

    Unity Technologies

    Joined:
    Apr 28, 2020
    Posts:
    40
    That does sound nice to have, but unfortunately I doubt we will add that. When the bug is fixed, the path can be changed with Addressables settings and it just wouldn't be enough of a priority to add another place to change it.
     
  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,444
    Do you happen to know in what Addressables version these fixes are going to land? I'm on 1.18.11 and can reproduce it.
     
  8. Kamand0l

    Kamand0l

    Joined:
    May 19, 2014
    Posts:
    24
    I will add that the hosting service seems to also be hosting the LocalBuildPath o_O . That makes things more confusing and hard to test locally:

    Unity 2020.3.5f1
    Addressables 1.18.13
     

    Attached Files: