How-to use Addressable Assets with an Azure Blob

Badger Dox
3 min readDec 4, 2019

--

Part 3 of 3: Building and Loading Addressable Assets with Azure Blob services

Previous tutorial: Part 2 of 3 — Connecting Unity3D’s Addressables to an Azure Blob

Project & Code

Need some assistance? Looking to talk some game dev.? Join the discussion on Discord

After you conquer this tutorial, you’ll no longer need to host assets within your build, freeing up precious memory. The previous tutorial ended with a newly created folder named ServerData. If it’s not open, go ahead and do. Inside Unity3D → Project Window → highlight Assets → Right-click → Show in Explorer → ServerData. Within the folder, ServerData will be an additional folder(s). These folders are created for each platform you are developing for. The data files within is what Unity3D will use to create assets from the addressables system.

Inside Azure, if not already there goto the blob you would like Unity3d to connect with. Once inside the blob scroll down it’s containers and clicking the inside the box.

Within the containers’ window hit the + Containers button to create a new one. Give this new container the name of the folder’s contents you will be copying from within ServerData. You MUST set the public Access level to Container (anonymouse read access for containers and blobs

Click on the container you just created. In this directory hit the Upload button and a new pop our window will appear on the right-hand side. Click the blue folder, to add upload the files Unity3D created for use. Navigate to your the ServerData folder we’ve been working with. The path should be something close to OS → Users →Username → Unity3DProjects → ProjectName → ServerData → BuildType. Shift-click and upload all three files at once.

Ex: my path-OS(C:)/Users/Badger/Games/AddressableAssetsHowTo/ServerData/Android

With the success of your files uploading into your blob’s container the Assets are now hosted remotely! Go back into Unity3d. Right-click to create a new class and name it LoadAssetsFromRemote, once created add it to a game object within the hierarchy. This example will contain a code snipped that loads and creates the Addressable assets. For more information on how Addressables loading works please check out these other great tutorials. For now, go ahead and type the code below into your class.

Don’t forget to set your label within the inspector!

With Unity set up to build remotely and our Azure Blob container holding the files Unity needs it’s finally time to build and test.

While the project builds some new operations are happening. First, it is copying addressable data into the project. Then It stripes out the corresponding assets freeing up memory.

Time to celebrate, you did it!

With a successful build status, you should see your resources populate immediately after the Unity3D Splash screen!

Find this series helpful? Please share it anywhere other people will find it useful. Anything unclear? Want to share your accomplishment? Leave a comment or join us on Discord!

--

--