Search Unity

Feedback & Implementation questions

Discussion in 'Addressables' started by Timboc, May 24, 2021.

  1. Timboc

    Timboc

    Joined:
    Jun 22, 2015
    Posts:
    201
    Use case
    We want artists & modders to be able to author content as addressables using our own SDK and upload to a remote bucket. The SDK will be nothing but light monobehaviours with no other dependencies. One artist may upload e.g. 'JanesCube', another maybe 'TomsSphere' with a custom shader.

    Current Setup:
    - Project A (modder-created project) builds addressables. These are uploaded and hosted by Unity Cloud Content Delivery.
    - Project B (Main app) loads the addressables.

    Current Understandings
    It seems the intention is that when project A builds the addressables, the *download* path is baked into the catalog? Though I feel we must be mistaken? This tripped us up for a good while. Is this taken from the RemoteBuildPath? Baking the download path into the catalog seems undesirable.
    Currently we're instead utilising the InternalIdTransformFunc override to replace a fixed path in catalog with our remote bucket. Is this the recommend approach for the separate projects use-case?

    - As the content is platform dependent, we host it in the appropriate [BuildTarget] buckets. e.g. /StandaloneWindows64/Catalog_xxx.json

    Issues
    As far as we can tell, there's no equivalent way of obtaining the BuildTarget at runtime (RuntimePlatform is something different). [BuildTarget] in the remote load path gets replaced at build time. Though... I believe there's no way for us to access any of the load paths at runtime? The AddressableAssetSettings is also in the Editor namespace?
    All we want to do is lookup e.g. /StandaloneWindows64/.. at runtime.. like the addressables package must be doing somehow.. it looks like we need to write a pre build script that sets a player pref or something but I assume we're missing something here?

    Other Questions
    We intend to have editor tools that support automatic packaging & uploading. This will require a bunch of backend work to do with creating user accounts/permissions, presumably an intermediary server which we manage, a database with all the latest catalog's etc. If we have content in a user-specific bucket/directory and always want the latest content, does it make sense to rename the .json and .hash files to just `catalog`? Renaming the file shouldn't break any addressable functionality right? Otherwise I imagine we'd have to manually iterate all the catalogs and find the most recent.

    Other feedback
    It was a little unexpected that our monobehaviour references failed to deserialize, even when the .cs & .meta files were duplicated between Project A & B. This turned out to be that it was a package in Project B so needed to be a package in Project A too. I mention it in case it catches anyone else out.
     
unityunity