Skip to main content
Code on this page is extracted from a compiling sample and checked daily.

1. Install

Install the SDK from the PIO package registry via UPM, pinned to an exact release. The registry is public, so no key is needed. The exact manifest lines are on Installation & versioning.

2. Configure

Once your studio is in the pilot, create your project in the dashboard. Note its API key, account id and project id. Create a Tutorial decision and pick its default option. The SDK and configuration call a decision an action definition. Define each option through payload parameters: steps (integer), skippable (boolean) and pacing_seconds (float). Give each option values for these parameters. Compile safe defaults into your game: five steps, skipping enabled and 1.5 seconds between steps.

3. Initialise

Register every decision your game requests, each with a fallback option, then initialise once at startup.
Samples~/BasicIntegration/Assets/Scripts/QuickstartBootstrap.cs

4. Request a decision

Set each field’s default in the dashboard to what your game does today, then generate code with PIO > Generate Code Constants. Read the decision through the generated class:
Samples~/BasicIntegration/Assets/Scripts/QuickstartBootstrap.cs
Adding an option in the dashboard needs no app release when it uses parameters and behaviour your payload-first integration already supports. After a model’s first training, new options go live within a few minutes. A model waiting for its first training offers the option once that completes. When PIO sends no payload, each property returns its default, so the player gets your game as it is today. If your game already decides this another way, see Decisions. Action is a label for logs. Don’t use it to choose what to do. PIO learns from your options’ payload fields, so set number ranges in the dashboard where they exist.

5. Track events

Valued events feed reward derivation; bare events record occurrences.
Samples~/BasicIntegration/Assets/Scripts/QuickstartBootstrap.cs

6. Verify

Run the game and exercise the decision. Check PIO/Diagnostics/Inspector for SDK state and PIO/Diagnostics/Event Log for queued events. Confirm arrival in the dashboard’s integration-health view. PIO/Verify Integration expects a PioSettings asset. This quickstart configures the SDK in code, so that window can report missing settings despite a working integration.