CodeBlanks Logo Icon CodeBlanks

Building for Steam

Learn Windows builds for Steam and Steamworks integration.

Windows build for Steam

The Steam platform primarily expects a Standalone Windows 64-bit (x86_64) build for desktop targets. Compiling yields the primary executable (Game.exe) and an asset container folder (Game_Data).

// SteamPipe tool pushes depots to Steam servers:
// Structure: Game.exe and UnityPlayer.dll must remain in the same root

Integrating the Steamworks SDK is necessary for achievements, cloud saves, and workshop features.

Steamworks initialization and SteamPipe

The Steam API is initialized at the start of the game cycle via SteamAPI.Init(). If the Steam client is not running, this call returns false and the game can terminate to prevent unauthorized execution.

if (!Steamworks.SteamAPI.Init()) {
    Debug.LogError("Steam client not detected!");
    Application.Quit();
}

Compiled builds are uploaded to the Steamworks dashboard via the SteamPipe command-line utility.

Practice Verify Steam connection status

Check the steamConnected flag using an if block. If true, print "SteamAPI Baslatildi: AppID 480" with Console.WriteLine.

Starter code

Player.cs
using System;

class SteamLauncher
{
    static void Main()
    {
        int appId = 480;
        bool steamConnected = true;
        // Steam durumunu kontrol et ve konsola yazdir
        
    }
}

Sample solution

Player.cs
using System;

class SteamLauncher
{
    static void Main()
    {
        int appId = 480;
        bool steamConnected = true;
        if (steamConnected)
        {
            Console.WriteLine($"SteamAPI Baslatildi: AppID {appId}");
        }
    }
}

Expected output

SteamAPI Baslatildi: AppID 480

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which file must reside in the project root to perform local editor testing with Steamworks integration?

  • steam_manifest.json
  • steam_appid.txt Correct answer
  • steam_config.ini
  • steam_license.key

Explanation: The steam_appid.txt file contains the Steam AppID of the game and enables local editor connections to the Steam API.

2 Initialize SteamAPI

Question
// Steamworks baglantisini baslat
bool isSteamReady = Steamworks.SteamAPI.____();
Answer
// Steamworks baglantisini baslat
bool isSteamReady = Steamworks.SteamAPI.Init();

Explanation: The Steamworks API library is initialized by calling the SteamAPI.Init() method.

3 Steam deployment tools

Term Meaning
Standalone Windows Standalone executable build for PC
steam_appid.txt Holds Steam App ID for editor tests
SteamAPI.Init() Connects game to the Steam client
SteamPipe Tool for uploading builds to Steam

All lessons in Expert