Search Unity

Possible to use Addressable system getting assets from Azure?

Discussion in 'Addressables' started by AustynPember, Nov 28, 2018.

  1. AustynPember

    AustynPember

    Joined:
    Mar 14, 2018
    Posts:
    17
    Hello - I am wondering if it is feasible to utilize an Azure cloud DB (blob?) to do this:

    I have a Unity application that will be ran primarily on UWP tablets and Desktops, with the possibility of WebGL application as well.

    This application currently has 3D models in the project folder, along with images and CSV files in the resources folder. When you go into a certain view in the app - it loads up this 3D model and displays some of these images, as well as reading data from the CSV file which dynamically generates buttons and also connects these buttons to certain parts of the 3D model (links to the GameObject.)

    My goal is to set up the application so as that when a logged in user goes to this "viewer" page in the app, it loads in the particular 3D model that they requested. The 3D model would be originally sitting in an Azure (cloud?) database. Along with this 3D model they would also get the images, CSV, and other files associated with the model. They could then save all this data to their device, so that they would not have to go download it again after they did it the first time. They could also choose to not save it as well. If they did save it, I also want to run a check every time they enter that "viewer" in the app that they are looking at the most updated files from the Azure DB. If they are not, then we would download the updated data.

    I've heard things about utilizing a headless unity server to deliver this content? I have no idea how that works.

    Is this something that Addressable Asset system helps with? Or do I just have to use the traditional AssetBundle requests?

    Thanks ~
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    I'm not familiar with Azure specifically, and how to set it up, but the short answer is that addressables gives you the ability to put content (models, textures, csv, whatever) into asset bundles. You can then put those bundles up on some server, and addressables will understand how to pull them down. It will automatically deal with caching to avoid re-downloading.
     
  3. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    FYI, we have our asset bundles on an Azure storage blob. It works fine. At the moment we just have public read (but not list) access to that blob container, but if it has to be secured, there are several ways to apply an SAS token to the URL, whether by modifying the addressables system or just altering the settings before initialisation.
     
  4. AustynPember

    AustynPember

    Joined:
    Mar 14, 2018
    Posts:
    17
    Thanks Bill
    This is good info too. I currently have a test set up where I am pulling from a blob container that is public read - but we are definitely going to have to make this secure soon. I am interested in ways to apply that SAS token - do you have any examples?
     
  5. AustynPember

    AustynPember

    Joined:
    Mar 14, 2018
    Posts:
    17
    Also, I was wondering how you packaged those assets and put them on Azure, as well as how your unity game client is actually referencing them?
    Our goal is to have assets packaged by some automatic process after being ran through PiXYZ batch, and then have our game client serve them up... the problem is - that's separate from the game client. I cant have thousands of 3D models, 2D files, etc... in my editor when I generate the build. So, I can't just use the Addressables asset window and package them up there, link them to the repository, and build.
     
  6. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    When I was testing this, I just edited the code in AssetBundleProviderRemoteWebRequest, but this is probably not the cleanest way and I haven't really looked at it since to find a cleaner way. In our case, settings.json is provided to the system off the server, so we could always modify it before feeding it into LoadCatalogsFromRuntimeData().

    Ah, now this is something that I am going to need to solve at some point. There are some threads here regarding building addressables in another project but I have not had the time to go through it yet, we just have everything in our main project but disabled all sorts of automatic building of the bundles, doing that in a batch build instead.