PlayOpsSdkSettings
Optional SDK settings. Pass one to the PlayOpsSDK constructor only to change a default.
Constructor
new PlayOpsSdkSettings( bool verboseLogging = false, bool useInvariantCulture = true, int defaultRequestTimeoutInSeconds = 10, int interactiveRequestTimeoutInSeconds = 30)var playOps = new PlayOpsSDK(new PlayOpsSdkSettings(verboseLogging: true));playOps.Initialize();Properties
| Property | Type | Default | Description |
|---|---|---|---|
VerboseLogging | bool | false | Routes the SDK’s runtime logs to the Unity console from Initialize() onwards, so startup logging is captured. |
UseInvariantCulture | bool | true | Initialize() sets the process culture to the invariant culture, so formatting, parsing and casing do not vary by device locale. The UI culture is not touched. See Process culture. |
DefaultRequestTimeoutInSeconds | int | 10 | Timeout for background, non-interactive HTTP requests. |
InteractiveRequestTimeoutInSeconds | int | 30 | Timeout for player-triggered requests such as configuration sync on session start. |
Process culture
The first thing Initialize() does is replace the process culture with
CultureInfo.InvariantCulture:
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;Without this, every value the SDK formats, parses, upper-cases or compares follows the device’s
locale. On a Turkish device "iOS".ToUpper() returns "İOS" — a dotted capital I — and that value
reaches the analytics warehouse as a corrupted platform name. Decimal separators and date formats
fail the same way.
Only the two formatting slots are assigned. CurrentUICulture and
DefaultThreadCurrentUICulture are never touched, so the language of your localized resources is
unaffected. The device’s language also still reports correctly through Application.systemLanguage.
Keeping device-locale formatting
The recommended approach is to leave UseInvariantCulture on and capture the device culture
yourself, on the line above Initialize(), then pass it explicitly wherever you format for the
player:
var deviceCulture = CultureInfo.CurrentCulture;
playOpsSDK.Initialize();
// Later, formatting a price for display:priceLabel.text = price.ToString("C", deviceCulture);This keeps player-facing values in the player’s locale while everything the SDK sends to the backend stays stable.
If you would rather the SDK left the culture alone entirely, turn the flag off. The SDK then reads and assigns nothing, and the culture-sensitivity above becomes yours to handle:
var playOps = new PlayOpsSDK(new PlayOpsSdkSettings(useInvariantCulture: false));