Picture your potential player on a Friday afternoon.
Your player has just left behind a hard week with long working hours. Their wife or husband is gone to their family's country house for the weekend along with the kids. The perfect time to go home, order pizza and browse through Steam with the wallet at hand.
With or without kids, with or without partner, we all had these awesome weekends.
So your player comes across your newly released game in the Steam shop. They see all the effort you put into creating polished content.
No need for convincing, they hand in their credit card details and buy two copies of your game. One for theirself, another for their friend / brother / sister.
You get your 19.95 bucks, twice. Both users happily start installing the game.
The remaining installation time suddenly exploded to 12 hours
What, 12 hours for over 30GB? What the fuck is in this game?
I'm not wasting my weekend on this shit, I'm out!
What happens afterward is not uncommon.
Your ex-player requests a full refund and purchase instead the next game in their wish-list.
One of the pain points for players is the waiting time wasted on downloading all the bytes of the whole game and start playing. People do not have that much time. Nothing will burn a hole in your wallet faster than an angry player.
Do you need to include in your installation package all these assets that are spawned in the level 5 of your game? Chances are, you don't.
Players will need a couple of hours to play through the initial content of your game. Use that to your advantage
The idea is simple.
Provide the minimum content possible in your game installation package and download the rest while playing the initial levels of your game.
Ideally, your game's download size should be below 100MB.
Level 1 Developer: "Storage is cheap, anyway"
We started developing our game a few months ago and we have big plans for it.
You and I worked endless hours into creating highly polished content.
Not only that, we saw some great offers in the Unity Asset Store, so we bought several asset packs at heavily discounted prices.
Now our game is full of content our players will love to play through. Those Sci-Fi modular parts, the exploding particle systems, the punchy soundtrack.
It's all gorgeous.
And slow to download.
Now your Android APK is well over 2GB, so you need to start messing with expansion files, which adds another good week to your efforts. But it's fine, we all have time here.
Or maybe you're publishing on Steam, so you can be at 30 GB, no problem. You just need a few hours for uploading it. And players? It's ok, people have a fast connection nowadays.
So we released our game. Some players reported some bugs, so we make a 5-minute fix and we go through all the long process again. Build, wait for hours, upload to stores, wait for hours.
And our players? They just re-download the whole thing again. Wait for hours, then start playing.
It's not a big deal.
Only that you are not recovering all the time you wasted on this previously. And a great deal of your players will stop downloading your game once they see how many hours they have to wait. That only gets worse with each update. Did I mention refunds?
We can do better than this, now that we have the tools.
Let's upgrade our skills to Level 2.
Level 2 Developer: Unity Addressables Hosting
Welcome to Unity Addressables.
This package will allow you to efficiently manage your game assets. That, my friend, includes online distribution. For an introduction on this topic, visit my previous article on Unity Addressables Benefits for your game.
- Set up an Amazon S3 Bucket for online distribution
- Mark our content as Unity Addressable Assets for online distribution
- Upload our content to the cloud
- Profit from tiny installation sizes (and others)
1. Setting Up a Free Amazon S3 Bucket
It's our lucky day. Amazon offers a free tier for their S3 service.
That means, we're going to host our content for free. The limitations for their free tier is mostly storage space and the number data transfers. At the moment of writing this, you can store for free up 5GB and perform 20,000 GET and 2,000 PUT requests, but do double check it in the official site of AWS Free Tiers.
What we are going to do here is to create an account for AWS so we are ready to upload our game content for further distribution.
Navigate to the AWS Management Console and click on Create a Free Account.
Enter your e-mail and bla bla bla. That will take you roughly a minute.
Be aware that you'll need to give them your credit card info to verify your identity.
Unless you're going pro right from the start, we want to evaluate this in our game first.
So, after confirming your account, choose the basic plan.
After a few minutes, your account will be activated (you'll get an e-mail). Then, sign in to your new console and open the S3 service panel:
You are now located at the S3 control panel.
Now we are ready to create the bucket like shown below (change your bucket name and region!):
Leave the permissions set to public for now, you'll have the chance to tweak them in the future.
That was the most tedious step.
The next step is a piece of cake: time to get your Unity Project to produce downloadable assets.
2. Unity Addressable Assets for Distribution
Finally we made it to Unity. That whole S3 process was getting old.
I will assume you have some content marked as Addressable in your game. If that's not the case because you are new to this, don't worry, I have you covered with the previous Unity Addressables Tutorial I wrote.
I'll show you the steps to get content uploaded in your newly created AWS S3 Bucket. We will do so based on a project I created for this purpose.
Instead of following the whole story, you can also skip the line, get access to the code now and read later.
A. Addressables Profile Configuration
The way to start is to tell Unity where to load remote assets from.
That we achieve by tweaking our Addressables Profile Configuration. In the Addressables main window, click on:
Profile: Default → Inspect Profile Settings.
This will redirect you to the settings we need to tweak.
Here is a collection of funny toys you can play with, but for our purposes we just need to focus on the Profiles section.
We want to make sure we set the Addressables RemoteLoadPath field to the correct URL.
The [BuildTarget] variable is left on purpose so Unity fetches in run-time the right assets for each of the platforms we build for. Android assets will be packed differently from Standalone, so each of these platforms will require a different directory.
The way I found my S3 Bucket URL is by uploading a random file; if you then navigate to its details, you'll see the base URL of your file and hence your bucket.
B. Addressable Asset Groups Configuration
So, we just told Unity where to load the remote assets from through the RemoteLoadPath variable.
- Go over the heavy assets you want to be downloaded remotely and mark these Assets as Addressable. In our case, it's the skybox materials.
- Open the Unity Addressables Window and assign these assets to Addressable Asset Groups. If you are just starting with Addressables, assign them to a single group for now; e.g. Skyboxes. Eventually, you'll want them to be grouped in a way that makes sense (check my Level-3 guide on Unity Addressables Tutorial for more info).
- Navigate to the Addressables Group inspector settings by clicking on the group and make the following adjustments:
- BuildPath is set to RemoteBuildPath
- LoadPath is set to RemoteLoadPath
We now have our skybox content assigned to a group that will be downloaded by your players in run-time.
3. Uploading Content to Amazon S3
All our settings are now in place. What about uploading our content to S3?
- Build player content.
- Upload it to S3.
The output content will be stored in the path dictated by the RemoteBuildPath variable you happened to see early in the Unity Addressables Profile Settings. If you didn't modify it, it's likely to be in a subfolder of your project called ServerData.
There you have it, it's that simple.
However, this can quickly become tedious. It's a very manual task that could easily be automated. I did just that so now uploading all my assets takes the press of a button inside Unity Editor.
To upload your Unity Addressable Assets directly from the Unity Editor, check my Unity Addressables Hosting Resource Pack at the end of the article.
4. Downloading Assets from Amazon S3
This is the part we all were waiting for. You now have a game you can distribute that is significantly smaller. The remaining part is launching it and watching it download the assets on demand!
If you followed this tutorial on Unity Addressables Hosting, chances are, you will be totally alright
By now, the asset groups you marked to be remotely downloaded are hosted in S3 and Unity knows how to fetch them.
Level 3 Developer: Unity Addressables Hosting Resource Pack
By now you should have your first Unity Addressables Hosting experiment up and running.
You learned how to build player content specifically to target downloadable content.
Level up your skills. Download it now.