docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Steamworks settings reference

    Configure the Steamworks API package settings in the Unity Editor interface.

    Use the Steamworks settings to import the Steamworks SDK and configure the Steamworks API package in your project. Unity stores these settings in ProjectSettings/SteamworksSettings.asset. The asset is Editor only and isn't included in the built application. To read the settings at runtime, refer to Generated runtime settings.

    To access the Steamworks settings, go to Edit > Project Settings > Steamworks.

    Property Description
    Locate Steamworks SDK Opens a dialog where you select your extracted Steamworks SDK folder. Unity copies the three Steamworks API libraries into the Assets/Plugins/Steamworks folder. After you import the SDK, the button label changes to Update Steamworks SDK. Select this to update the SDK.

    Note: The current version of the Steamworks API package supports only Steamworks SDK version 1.65.
    App Id Defines the application ID that you get from the Steamworks partner website. The default is unset. SteamAPI.Init doesn't read this value directly. It reads the App Id from steam_appid.txt, which the package creates from this value, or from Steam when Steam launches your application. For testing, use 480 for Valve's public test app, Spacewar. You can also set this value through the Unity Editor command line. For example, Unity.exe -projectPath C:\MyProject -steamworksAppId=<id>.

    Note: To read the App Id at runtime, use the generated SteamworksRuntimeSettings.AppId constant. Unity regenerates this constant from the App Id setting each time you change it.
    steam_appid.txt Creation Controls when the package automatically generates the steam_appid.txt file next to your built executable. This text file stores the value in the App Id property. The Steamworks API reads this file to find your App Id when your application starts outside the Steam client. The default is Development Build Only.
    • Always Create: Generates the file for both development and release builds.
    • Development Build Only: Generates the file for development builds only.
    • Release Build Only: Generates the file for release builds only.
    • Never: Doesn't generate the file. Select this if you only run your application by launching it through the Steam client, which provides the App Id. If you launch your application outside the Steam client, such as through Build And Run, create a steam_appid.txt file manually next to your built executable.
    Note: This property is unavailable until you set an App Id. On Windows and Linux, Unity writes this file next to the executable. On macOS, it writes this file inside the app bundle in Contents/MacOS. If you don't set an App Id, the build logs a warning and writes no file.
    Write steam_appid.txt to the project root for Play mode Writes the steam_appid.txt file to your project root using the specified App Id value and replaces any existing file. The Steamworks API requires this file to find your App Id when it initializes in the Unity Editor. The Editor creates this file when it's missing. Use this button to overwrite it after you change the App Id. If the Steamworks API is already initialized, exit and re-enter Play mode for the new value to take effect.
    Note

    To relaunch your application through the Steam client when it starts outside the client, add ENABLE_RESTART_STEAM_APP_HOOK to Scripting Define Symbols in the Player settings. Without this define, Unity doesn't relaunch your application. The hook runs only in a Player, never in the Editor or a Dedicated Server build, and only when you set an App Id. For more information, refer to Relaunch your application through the Steam client.

    Generated runtime settings

    When you import the Steamworks SDK, Unity generates SteamworksRuntimeSettings.cs and the Unity.Steamworks.Settings assembly definition in Assets/Plugins/Steamworks/Settings.

    The SteamworksRuntimeSettings class exists only after you import the Steamworks SDK. Scripts in the default assembly can use this class directly. If your script is in a custom assembly, add Unity.Steamworks.Settings to the Assembly Definition References list in the script's assembly definition (.asmdef) file. For more information, refer to Referencing assemblies.

    The generated class contains the App Id and steam_appid.txt Creation values, so your code can read them at runtime. This class also contains the code that relaunches your application through the Steam client. This code runs only when you add the ENABLE_RESTART_STEAM_APP_HOOK scripting define.

    Unity updates these files each time you change a setting. Don't edit these files by hand. You can move the generated files to another folder. Unity regenerates the files in the new location.

    Additional resources

    • Custom scripting symbols
    • SteamAPI_RestartAppIfNecessary (Valve)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)