PlayOpsSDK
The root entry point for all PlayOps services.
Constructors
PlayOpsSDK(params ServiceSettings[])
Creates the SDK. Credentials come from the dashboard — see Connect to the dashboard. Pass settings only to change defaults, such as PlayOpsSdkSettings or a plugin’s settings.
var sdk = new PlayOpsSDK();sdk.Initialize();Obsolete constructors
The constructors that take PlayOpsSettings still work but are obsolete. See Upgrading from an earlier SDK version.
Methods
| Method | Returns | Description |
|---|---|---|
Initialize() | void | Starts all background services. Call once in Awake before accessing any service. Also replaces the process culture with the invariant culture — see Process culture. |
GetService<T>() | T | Returns a registered service by type. Throws PlayOpsNotInitializedException if called before Initialize(). |
Extension methods
These convenience accessors are extension methods. Import the corresponding namespace to use them.
| Method | Namespace | Returns |
|---|---|---|
sdk.Analytics() | PlayOps.Analytics | PlayOpsAnalytics |
sdk.Configurations() | PlayOps.Configurations | PlayOpsConfigurations |
sdk.InAppPurchases() | PlayOps.InAppPurchases | PlayOpsInAppPurchases |
Exceptions
PlayOpsConfigException — thrown by the constructor when the project is not connected to the dashboard. See Connect to the dashboard.
PlayOpsNotInitializedException — thrown when accessing a service before calling Initialize().
PlayOpsServiceNotFoundException — thrown when requesting a service type that is not registered (e.g. a service whose assembly is not in the project).