Upgrading to 0.4
Before you upgrade, search your project forGetDecision and for payload reads with ?? .- Replace
d?.GetInt(key, value) ?? valuewithd.GetInt(key, value). The same applies to every payload getter. - Remove null checks on the result of
GetDecision. It now always returns a result. - Code that caught the exception from calling
GetDecisionbefore the SDK was ready can go. The call now logs a warning and returns Baseline. - If your game has its own decision logic, run it when
HasPayloadis false. - Set your iOS minimum deployment target to 16.0 or later.
PIO/Generate Code Constants and recompile.Breaking changes
GetDecisionalways returns a result and never returns null. With tracking disabled it returns a Baseline result with no payload and makes no network call. Before the SDK is ready it logs a warning and returns Baseline instead of throwing. To upgrade, replaced?.GetInt(key, value) ?? valuewithd.GetInt(key, value)and remove null checks onGetDecision.- The minimum iOS version is now 16.0.
Features
- Add
HasPayload, which is true only when PIO sent payload values, so a game with its own decision logic can keep running it when there is no payload. GetJson(key, default)takes a default, like the other payload getters.- Serve on-device decisions with the model each player is assigned to. Existing installs download the model once into a new cache.
Features
- Persist the server-issued user proof and send it when authenticating returning players.
- Generate typed option-payload accessors and warn in the Editor when the dashboard schema changes.
- Expose the chosen option’s payload through
DecisionResult. - Include device details and the installation timestamp with events.
- Apply serving settings to on-device decisions.
- Serve eligible decisions on the device by default, with sampled cloud comparisons.
Fixes
- Recover authentication after an initial connection failure and restore decision routing.
- Preserve SQLite when Unity strips unused code so events can still be stored.
- Fix HTTP client setup that could throw in game players.
- Enable the exception support required by native state collection on iOS.
Breaking changes
- Remove
PIO.TrackReward. Report outcomes withPIO.TrackEvent(eventType, value)so the platform can derive reward signals.
Features
- Generate action identifiers that reflect whether an action is active or retired.
- Add on-device decision routing and cache downloaded model bundles.
- Handle the cloud policy for players without previous activity.
- Accept non-negative numeric values in
PIO.TrackEvent. - Mark Editor and development-build events as internal traffic.
- Emit foreground dwell heartbeats that pause when the game is in the background.
- Record local state and include the state used to serve a decision in decision events.
- Suppress App Tracking Transparency prompts and advertising identifier collection for child-directed projects.
- Collect
device_region, an uppercase two-letter country or region code from the device’s regional settings. This supports region-aware decisions and comparisons with network-derived country data for fraud checks. Omit the code when unavailable. It reflects regional preferences, not physical location; the SDK collects the code but does not perform fraud checks.
Breaking changes
- Rename
PioSettings.GameIdtoProjectIdand change backend URL paths from/accounts/{account_id}/games/{game_id}/...to/accounts/{account_id}/projects/{project_id}/.... ExistingPioSettings.assetvalues migrate automatically.
Features
- Include contract and model versions in decision events.
Fixes
- Include the SQLite libraries needed to store events on Android and iOS.
Features
- Add an in-game debug overlay, enabled through
PioConfig.ShowDebugOverlay. - Add a Roslyn analyser to validate
TrackEventandSetStatekeys. - Authenticate with automatic retries and background token refresh.
- Generate action constants and refresh schema information when the Editor regains focus.
- Configure the SDK through a
PioSettingsasset and initialise it withPIO.Init(). - Enable or disable tracking when player consent changes.
- Request cloud decisions with
PIO.GetDecisionand automatically record decision events. - Add setup, integration verification, decision simulation and play-mode diagnostics under the PIO Editor menu.
- Use one
PioSettingsasset across setup, code generation and integration verification. - Report SDK errors through
PIO.OnError. - Add
PIO.TrackEvent,PIO.TrackRewardandPIO.SetStatefor game events, rewards and custom decision state. - Store events in a local SQLite queue and send them in background batches.
- Warm the HTTPS connection before authentication.
- Persist a stable user identifier across launches.
- Add offline mode through
PioOptions.OfflineMode. - Target the production service by default.
- Start a new session after the configured background timeout.
- Collect and serialise device and game state for decision requests.
Fixes
- Use configured fallbacks when authentication fails during initialisation.
- Close the event queue before an Editor domain reload to prevent crashes.
- Rename state fields
processor_frequencytocpu_frequencyandmono_used_mbtomono_used.