RestartAppIfNecessary Bootstrap Generator
Copy-paste-friendly starter for relaunch-through-Steam behavior and dual-distribution guards.
How it works
Pick wrapper and App ID; export Markdown for your repo. Pair with Player.log triage when Init or launch context is unclear.
Generates a minimal early bootstrap pattern. Adjust to your entry point (Player loop script, Boot scene, or native plugin).
using Steamworks;
public static class SteamBootstrap
{
// SteamAPI_RestartAppIfNecessary must run before SteamAPI_Init when applicable.
public static bool TryRestartThroughSteam()
{
return SteamAPI.RestartAppIfNecessary(new AppId_t(uint.Parse("480")));
}
}
// Usage (very early, e.g. before first scene load):
// if (SteamBootstrap.TryRestartThroughSteam()) {
// Application.Quit();
// return;
// }FAQ
- Where should this run?
- As early as possible in process startup, before Init and before creating the game window when practical.
Related tools
-
Steam Callback Pump Scaffold Generator
RunCallbacks placement for client/server, threading notes, feature matrix, regression checklist.
-
Rich Presence Publish & Cache Checklist
Partner publish vs client cache vs branches — rollout and QA handoff for ‘code works but Steam doesn’t show it’.
-
Steam Inventory Schema Draft Builder
Categories, tradability, bundles/consumables — draft itemdef-oriented JSON + policy warnings.
-
Workshop Upload Error Explainer
InvalidParam and common codes — ranked causes, path checks, legal/preview metadata checklist.
-
Steam Relay vs Unity Relay Decision Helper
Storefronts, concurrency, cross-store, cost — scored recommendation and phased migration.
-
Steam Capsule Validator
Generate Steamworks-sized PNGs from one master image, ZIP export, safe-area inspector, and policy reminders.