Skip to content

PlayOpsSDK

The root entry point for all PlayOps services.

Constructors

PlayOpsSDK(PlayOpsSettings, params ServiceSettings[])

Creates the SDK instance without an existing DI container. Pass one or more ServiceSettings (e.g. AnalyticsSettings).

var sdk = new PlayOpsSDK(
new PlayOpsSettings(cloudUrl: "...", gameSecret: "..."),
new AnalyticsSettings(appId: "...", secret: "...")
);

Methods

MethodReturnsDescription
Initialize()voidStarts all background services. Call once in Awake before accessing any service.
GetService<T>()TReturns 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.

MethodNamespaceReturns
sdk.Analytics()PlayOps.AnalyticsPlayOpsAnalytics
sdk.Configurations()PlayOps.ConfigurationsPlayOpsConfigurations

Exceptions

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).