Snippet: Automate Steam upload

Hi all,

I couldn’t find any snippets for this and spent an embarassing amount of time figuring it out, so I thought I’d post it here in case it helps anyone. Below is a method you can use to trigger a Steam upload in your build post-processing:

static void RunSteamCmd(string username, string appId, string description) {
    string steamCmdPath = @"C:\Game Development\Steam SDK\tools\ContentBuilder\builder\steamcmd.exe";
    string appBuildScriptPath = $@"C:\Game Development\Steam SDK\tools\ContentBuilder\scripts\app_build_{appId}.vdf";
    string arguments = $@"+login {username} +run_app_build -desc ""{description}"" ""{appBuildScriptPath}"" +quit";

    System.Diagnostics.Process.Start(steamCmdPath, arguments);
}

You’ll need to tweak the file paths to suit you, you also need to have logged in with a password to steamcmd at least once. But this will start a process, run the build script and then exit.

Hope it helps someone!

2 Likes

Hi,

It’s late but I was curious if it was still working ?
I upload to steam at least once per week and I’m looking for a “1 button” unity tool to automate it :3