Skip to main content
PIO.SetState sets a named value included in the next decision’s state snapshot. Better context means better decisions; a difficulty choice that cannot see the player’s level is guessing.
Samples~/BasicIntegration/Assets/Scripts/GuideExamples.cs

The rules

  • Accepted types: string, int, long, float, double, bool, or null. Anything else is warned and dropped.
  • Visibility is immediate: SetState then GetDecision in the same frame sees the value.
  • State is per-session and cleared on re-initialisation.
  • Keys should match state definitions registered in the dashboard, such as std_level_index.
The SDK adds context of its own: each decision’s snapshot includes per-action decision counters from earlier calls in the session.