Search Unity

How to Load Addressables from Firebase Storage?

Discussion in 'Addressables' started by xLeo, Sep 5, 2019.

  1. xLeo

    xLeo

    Joined:
    Sep 21, 2010
    Posts:
    194
    I would like to load bundles from Firebase Storage, but I don't know how to override the loading method.
    Is that possible?

    I know that it's possible to format the bucket address to an URL (https://firebase.google.com/docs/storage/web/download-files) and append "?alt=media" parameter to download the file, but I don't even know how to append it to all AssetReference objects (including implicitly loaded dependencies).
    We have configured our bucket to enable public reading (even though I think this is just bad).

    BONUS QUESTION(s):
    is it possible to configure our addressables RemoteBuildPath and RemoteLoadPath to build to a "bundleVersion"-named subdirectory? Where are the documentation for available "Profile Variables" (as mentioned here)?
     
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    I'm not familiar with the firebase, if it can expose http protocol for the root folder, it will be a lot easier just configure it as the remote load path. But I'm not sure about this.

    If you have to use the signed url, then this may help https://forum.unity.com/threads/loading-content-with-signed-urls.719783/#post-4882328. Notice the last floor said there will eventually built-in support for downloading signed url.

    For the bonus question, please checkout the template syntax and bundle version.
     
  3. robinryf

    robinryf

    Joined:
    May 22, 2014
    Posts:
    54
    Favo-Yang likes this.
  4. Siddhant003

    Siddhant003

    Joined:
    Apr 20, 2020
    Posts:
    2
    Hiee .. I downloaded your Example Project ...Getting this error
    The name 'FirebaseAddressablesCache' does not exist in the current context
    Any Suggestion?
     
  5. robinryf

    robinryf

    Joined:
    May 22, 2014
    Posts:
    54
    Hi Siddhant003,

    Hmm that file should be there. Can you see the file at the path: "Assets/RobinBird.FirebaseTools/Storage/Addressables/FirebaseAddressablesCache.cs" ?

    If the RobinBird.FirebaseTools directory is empty then the Submodule is missing. You can download the missing files here and paste them into the RobinBird.FirebaseTools directory
    https://gitlab.com/robinbird-studios/libraries/unity-plugins/firebase-tools
     
  6. Siddhant003

    Siddhant003

    Joined:
    Apr 20, 2020
    Posts:
    2
    Thanks for the reply . Actually What issue I am facing is I am able to upload the Addresables of a model into Firebase Storage . it give me a catalog.json file, hash file , shader and bundl file. And Using Firebase Storage I have provided the path and downloaded the url also . But I am not able to load the model from storage . I am stuck over there and not getting any idea how to proceed . Any suggestions will be appreciated. Any one thing more to ask We have to make this manifest.json file ? and where to keep it?
     
    Last edited: Apr 21, 2020