Search Unity

Load assets from server using a Shared Access Signature

Discussion in 'Addressables' started by JakHussain, Feb 5, 2019.

  1. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    318
    I'm storing my addressable assets on a cloud file storage service and would like to secure assets from direct get requests like simply pasting the URI in the browser by generating a Shared Access Signature (SAS) that lives for a limited time and appends to the end of the URI for secure temporary access.

    The addressables api supposedly just calls the UnityWebRequest api under the hood when downloading assets and handling dependencies. So I tried looking in the source code to see if I could edit it and simply make a new overload for the Load function which would append a provided string to all web requests.

    As luck would have it, it wasn't that easy and I didn't find any code that looked like it was making any kind of web request to edit.

    How can I go about making this custom change? And are there plans for the api to include an overload that could append a token at the end of all requests?