Remote Configuration Overview
Remote configuration lets you change your game’s behaviour parameters from the PlayOps dashboard without shipping a new app release. Configuration values are downloaded to the device at runtime and accessed through strongly-typed C# classes.
How it works
- You define configuration classes in C# and decorate them with
[Tactile.ConfigProvider("key")]. - You bundle a default configuration JSON file with your game (in
Assets/[Configuration]/). This is what players get on first launch or when offline. - At runtime, call
configurations.Sync()to download the latest configuration from the server and update the local cache. - Call
configurations.GetConfiguration<T>()to access the current values as a typed object. - When you update configuration values in the PlayOps dashboard and publish them, players receive the new values on their next sync.
Bundled default configuration
You must include a default configuration JSON file in your game so players have working values on first launch or when offline. Place these files in Assets/[Configuration]/ with one file per platform and environment:
Assets/└── [Configuration]/ ├── configuration-ios-dev.json ├── configuration-ios-prod.json ├── configuration-android-dev.json └── configuration-android-prod.jsonEach file contains the default values for all your configuration classes. The top-level keys must match the key argument in your [ConfigProvider] attributes:
{ "ShopConfig": { "FeaturedProductId": "featured_item_123", "DiscountPercent": 0, "SaleActive": false, "Products": [ { "Id": "coins_100", "CoinsAmount": 100, "PriceUSD": 0.99 } ] }, "IAPConfig": { "InAppProducts": [ { "Identifier": "com.example.coins100", "Title": "100 Coins", "Price": 0.99, "CurrencyCode": "USD" } ] }}The SDK includes build processors that handle configuration archiving automatically — you only need to create these JSON files. At build time, the SDK selects the correct file based on:
- Platform: determined by Unity’s active build target (iOS or Android)
- Environment: determined by Unity’s Development Build toggle — checked =
dev, unchecked =prod
These files are required for all builds, even if you don’t use remote configuration yet. Without them, the build will fail.
See Defining Configuration Classes for details on how C# classes map to these JSON keys.
Accessing the service
PlayOpsConfigurations configurations = sdk.Configurations();Always call configurations.Initialize() before accessing any configuration values. This loads the bundled fallback configuration into memory.
Offline behaviour
If a device has no network connection when Sync() is called, the SDK silently continues with the locally cached values. Sync() does not throw on network failure — it leaves the existing configuration intact.
The first call to GetConfiguration<T>() after Initialize() (without a prior Sync()) returns the values from the bundled JSON file that was included at build time.
Events
Subscribe to configuration events if you need to react when values change:
configurations.OnConfigurationDownloaded += (raw) =>{ Debug.Log("New configuration downloaded from server.");};
configurations.OnConfigurationUpdated += (raw) =>{ Debug.Log("Configuration applied. Refreshing UI."); RefreshShopPrices();};