Prepare for Release
Move a Unity game from account-billed testing to a player-facing build
Prepare for Release
During development the SDK runs on your API key, and AI usage is billed to your account. A release build should instead use device auth, so each player signs in with their own PlayKit account and pays for their own AI usage. This page covers the switch.
API Key
No action is required to remove the API key. It is stored in the editor's EditorPrefs, which is editor-only and is never bundled into a build, so every build uses the device auth flow automatically.
To clear the stored key entirely, open PlayKit > Settings and click Logout — this deletes it from EditorPrefs. This is optional, since the key never ships in a build either way.
The only setting that can ship a key is Build API Key Injection in PlayKit > Settings. It is disabled by default and must remain disabled for public releases, where it displays ✓ DISABLED — No API key injection (safe for production).
To rehearse the player login flow inside the editor, enable Play as Player in PlayKit > Settings. This retains the stored key while forcing the device auth flow, so the LoginWeb.prefab login UI is shown.
Distribution Channel
Confirm the Distribution Channel in PlayKit > Settings matches where the game is shipping (standalone, steam_release, ios, or android). This value is synced automatically when a game is selected and determines how in-app purchases and recharge are handled.
Branding
Configure the name, description, logo, and key art shown on the player sign-in and authorization screen. This is set on the PlayKit platform, not in Unity — see Setting Up Branding.
Release Checklist
- Branding (name, logo, key art) is configured — see Setting Up Branding.
- Build API Key Injection is disabled.
- The game selected in PlayKit > Settings is the one being shipped.
- The player login UI (
LoginWeb.prefab) appears in a clean build, and a real player can sign in. - AI calls are billed to the player's account (credits are deducted from the player).
- Default AI models are set under AI Model Defaults.
Next Steps
- Authentication — API key and device auth details
- Payment — player billing and credit configuration