Publishing Unity Games on Steam: The Ultimate Guide

Eric Yoon
6 min readMay 27, 2022

Steam is one of the most popular game publishing platforms today, yet Steam developers haven’t made it exactly easy to publish apps to the platform, even in 2022. Here’s how to publish Mac and Windows apps to Steam from Unity.

Glossary

Steam has lots of confusing terminology that you should get used to.

  • Steamworks: Steam’s game publishing platform for developers.
  • Steamworks.NET: a C# library used to implement Steam features in your game.
  • SteamPipe: a command-line utility to upload your game builds to Steam.
  • Depot: think of a depot as an SKU for your game. There could be a depot for Windows, a depot for Mac, or a depot for French-speaking Mac users.

Getting Started with Steamworks

Head over to partner.steamgames.com and create a developer account. This guide will not go over account creation, but the website is fairly straightforward to use. Once you have an account, pay a product submission fee and create a new application.

Adding Libraries to Unity

Steam has lots of great platform features such as achievements, cloud saves, and the Steam Overlay. We want to be able to harness this power in our game!

We will be using the open-source Steamworks.NET library to add this functionality to our game.

  1. Download the latest Steamworks.NET .unitypackage file from the repository’s releases tab. Double-click the package and select all files to import it into your game.
  2. At the root of your Unity project (not in your Assets folder), you will find a new file called steam_appid.txt. Go to your Steamworks application page, copy the App ID in parentheses (which identifies your app to Steam), and replace the “400” found in the file with your App ID.
  3. Open up the SteamManager.cs file imported by Steamworks.NET under Assets/Scripts/Steamworks.NET. Around line 99, replace AppId_t.Invalid with (AppId_t)xxxxxxx , where xxxxxxx is the App ID that you copied.
  4. Create a new empty GameObject in your scene and add the SteamManager script to it.

Now, you’re ready to build your Unity app.

Building Your App

Build your app for Mac and Windows normally. If you are building for Universal Windows Platform, you’ll want to build for Standalone instead.

When building Mac apps, you need to staple a certificate and notarization to your package so users don’t get “app not trusted” errors. Follow my guide for preparing sideloaded apps here.

Steamworks Configuration

On your Application Dashboard in Steamworks, you’ll see two checklists: a Store Presence checklist and a Build checklist. To get your game published, you’ll have to complete both checklists and submit your app in both review queues.

To complete the store presence checklist, you’ll have to upload some artwork and fill out some forms, but this guide won’t cover this process.

We will be overviewing how to complete each step in the Build checklist to publish your app.

Installation Setup

On your Application Dashboard, click Edit Steamworks Settings. Go to Installation > General Installation. Create two launch options:

Launch Option 0
Executable: release/YourGame.exe
Operating System: Windows

Launch Option 1
Executable: YourGame.app
Operating System: macOS

Depot Setup

Go to your Edit Steamworks Settings page. Go to SteamPipe > Depots. Create two depots: one for Mac and one for Windows, setting the Operating System field properly. Take note of your depot numbers; all but the last digit will match your App ID. For example, if your App ID is 1234560 , your depots will be 1234561 and 1234562 .

Important: now head to the Publish tab and click Prepare for Publishing. Click Publish to Steam and type the secret key STEAMWORKS . Click Really Publish.

Permissions Setup

In the header, head to Users & Permissions > Manage Groups. Create a new group. Grant all permissions to the group, add your application to the group, and add yourself to the member list.

This step is often overlooked in tutorials, but not doing so will result in a permissions error when you try to upload your build.

Package Setup

Back in your Application Dashboard, click All Associated Packages, DLC, Demos and Tools. For each package in Store/Free to Play or Promotional or special use, click on the package and add the two depots that you created.

Uploading your Builds

There are two methods to upload builds to Steam. You can either use the Web interface and upload ZIPs, or you can use the SteamPipe CLI utility.

  • The web interface only allows uploads of up to 2048MB.
  • The web interface does not show error info. If you run into an error, use SteamPipe instead for extended logs.
  • SteamPipe is supposed to work on Mac and Windows, but I could only figure out how to run it on Windows. Your mileage may vary.
  • There seems to be an issue uploading macOS apps using Steampipe, in which certification and notarization gets lost in the process. If your app becomes unrunnable when uploading from Steampipe, try using the Web interface instead.

Method 1: Using the Web Interface

Create two zips: one containing your Mac .app folder/file, and one containing a folder called release that contains your .exe file. Head to partner.steamgames.com/apps/depotuploads/xxxxxxx where xxxxxxx is your App ID. Upload both ZIPs.

Method 2: Using Steampipe

Download the latest version of the Steamworks SDK from this page.

Inside tools/ContentBuilder/content , create two folders: mac and windows . Place your .app build into the Mac folder. In the Windows folder, create a folder called release that contains your .exe file.

Now, let’s open up a few files in your favorite code editor and make some modifications.

tools/ContentBuilder/run_build.bat : replace the contents of the file with the following and replace bolded elements:

builder\steamcmd.exe +login your_steam_username your_steam_password +run_app_build ..\scripts\app_build_YourAppID.vdf

tools/ContentBuilder/scripts/depot_build_1001.vdf : rename the file, replacing “1001” with your Mac depot ID.

  • Set “DepotID” to your depot ID.
  • Under “FileMapping”, set “LocalPath” to .\mac\* .

In the end, your file should look like:


"DepotBuild"
{
"DepotID" "xxxxxx1"
"FileMapping"
{
"LocalPath" ".\mac\*"
"DepotPath" "."
"Recursive" "1"
}
}

tools/ContentBuilder/scripts/depot_build_1002.vdf : rename the file, replacing “1002” with your Windows depot ID.

  • Set “DepotID” to your depot ID.
  • Under “FileMapping”, set “LocalPath” to .\windows\* .

In the end, your file should look like:

"DepotBuild"
{
"DepotID" "xxxxxx2"
"FileMapping"
{
"LocalPath" ".\windows\*"
"DepotPath" "."
"Recursive" "1"
}
}

tools/ContentBuilder/scripts/app_build_1000.vdf : rename the file, replacing “1000” with your App ID.

  • Fill in the “AppID” field with your App ID.
  • Set “Preview” to "0" .
  • Comment out (put a // before the line) the “Local” and “SetLive” fields.
  • Change “ContentRoot” to "..\content\".
  • Replace each entry in “Depots” to have your depot number, followed by the name of the depot file from the previous steps.

In the end, your file should look like:

"AppBuild"
{
"AppID" "xxxxxxx"
"Desc" "My Game 1.0.0"
"Preview" "0"
// "Local" "..\..\ContentServer\htdocs"
// "SetLive" "AlphaTest"
"ContentRoot" "..\content\"
"BuildOutput" "D:\output\"
"Depots"
{
"xxxxxx1" "depot_build_xxxxxx1.vdf"
"xxxxxx2" "depot_build_xxxxxx2.vdf"
}
}

Double click run_build.bat and watch the Command Prompt window. You may have to enter a 2FA Steam Guard code. If any errors occur, they will be logged in the output folder. Your build should be uploaded to Steam.

Setting Your Build Live

Back in Steamworks under Edit Steamworks Settings > SteamPipe > Builds, there should be a new build listed. Under Set build live, click “default” as your branch and click Preview Change. Click Set Build Live Now.

Finally, click on the Publish tab, and go through the same process you did before to deploy your changes to the Steam store.

If you go to your Steam client, you should see that a new app appeared in your library! Wait 3 minutes and click install on your app.

Verify that your app files correctly installed on your machine and that you can run your app. On Windows, your files should be in C:\Program Files (x86)\Steam\steamapps\common\Your App Name . On Mac, your files should be in ~/Library/Application Support/Steam/steamapps/common/Your App Name .

Additional Reading

Thanks to the many tutorials and posts that helped me figure this out myself. I’ve linked some posts that helped me through this process. Take a look if you’re stuck.

Conclusion

Thank you for reading, and I hope this guide helps. You can check out my work at yoonicode.com.

--

--