Addressables with Loading Bar in Unity (AWS) Part-2

Make your games lighter and performant

OnurKiris
4 min readJan 7, 2024
Image by svstudioart on Freepik

In the previous part, we were setup addressables in Unity and created the AddressablesManager.cs to handle loading operations. In this part, we will create S3 Bucket from AWS and make final adjustment in Unity to finish the topic.

I wont cover how to create an account in AWS since there are already plenty of guides of doing that.

Create S3 Bucket

On the top-left side of AWS console page, click Services > Storage > S3

In opened page, click Create Bucket. Enter your bucket name and make enable ACLs.

Also you need to uncheck Block all public access and check acknowledge text below, otherwise no one can access your asset data :) then leave the rest as it is and Create Bucket.

Finally we created our S3 Bucket to store asset data. Now we need to create the actual asset data and upload it S3 Bucket. Now go back Unity, in Project window > Assets > AddressableAssetData > AddressablesAssetSettings. Click on it, in the inspector, under Catalog section, check Build Remote Catalog, then make Build & Load Paths ‘Remote’.

Now create server data by AddressablesGroups > Build > New Build > Default Build Script.

Then go to your project folder, open ServerData folder.

Inside that folder, drag and drop StandaloneWindows64 (which is your build target, if you were build on Android, you will see a folder called ’Android’) folder to S3 Bucket page.

Before clicking Update button, dropdown Permissions tab, then click Grant public-read access and I understand text. Then click Update button.

Now we need the actual bucket adress. You can get it from any of uploaded files. Just click one of them and take the bucket url. But you only need address until bucket name part like: https://s3.eu-central-1.amazonaws.com/onur.addressables/

Now go back to Unity, click ManageProfiles in Addressables Groups window:

Make Remote section Custom and paste your bucket adress to Remote.LoadPath like shown below. Dont forget to add [BuildTarget] to end of your bucket adress.

Now you are all set! If you want to update anything later, for example: change material color of character, save the character prefab then update server data folder by Addressables Groups window > Build > Update a Previous Build. Then again upload the folder inside ServerData to S3 Bucket like you did before. (Replace the files if asked and dont forget to grant publis access) Thats all! :)

Conclusion

Addressables in Unity are really great feature to improve your game, espacially larger games. Its very flexible construct allows you to adjust with your game so easily once you setup the system. Lighter build size is also another great benefit as well as optimizing the memory.

Hope you guys like the tutorials. Feel free to reach me out for further questions or suggestions: https://www.linkedin.com/in/onur-kiris/

Until next one!

--

--