PlayOpsConfigurations
The remote configuration service. Access via sdk.Configurations().
Methods
Initialize()
Loads the bundled fallback configuration into memory. Must be called before any other method.
configurations.Initialize();GetConfiguration<T>()
Returns the current cached instance of T. Returns the bundled default until a successful Sync() or Update().
var iapConfig = configurations.GetConfiguration<IAPConfig>();Sync()
Coroutine. Downloads the latest configuration from the server and applies it to the local cache.
yield return configurations.Sync();Does not throw on network failure — the existing cached values remain active.
Download()
Coroutine. Downloads the latest configuration from the server without applying it. The downloaded data is passed to the OnConfigurationDownloaded event — subscribe to it and call Update(hashtable) when you are ready to apply.
configurations.OnConfigurationDownloaded += rawConfig =>{ // Apply when ready (e.g. between levels) configurations.Update(rawConfig);};yield return configurations.Download();Update(Hashtable rawConfiguration)
Applies raw configuration data to the local cache. Calling without an argument is a no-op — you must pass the hashtable received from OnConfigurationDownloaded.
Reset()
Clears the in-memory cache and removes the locally persisted configuration.
GetMetadataVersion()
Returns a PlayOpsMetadataVersion object with the version and environment of the active configuration.
var version = configurations.GetMetadataVersion();Debug.Log($"Config version: {version.Version}");Events
OnConfigurationDownloaded
event Action<Hashtable> OnConfigurationDownloadedFires when a configuration is successfully downloaded from the server (before it is applied).
OnConfigurationUpdated
event Action<Hashtable> OnConfigurationUpdatedFires after a configuration is applied — either from Sync() or Update().