Configuring your project for Unity Remote Config
Requirements
- This version of Unity Remote Config Runtime requires Unity version 2019.4 or higher.
- Set your Editor scripting runtime to .NET 4.X Equivalent (or above).
- Set your API Compatibility Level to .NET 4.x.
- Enable Unity Services for your project.
- Install the Remote Config package (detailed below).
- Set assembly definition references (detailed below).
Installing the Remote Config package
See documentation on packages for more information on working with packages in a project. These steps may vary depending on which version of the Unity Editor you’re using.
Verified release
- In the Unity Editor, select Window > Package Manager.
- From the Package Manager window, find Remote Config in the Packages List view and select it.
- In the Package Specific Detail view, select the version and install to import the package into your project.
Preview release
- In the Package Manager window, the Advanced button lets you toggle Show Preview Packages to display them in the Package List view.
- Follow the instructions for the Verified Release installation.
Beta customers
Upon receiving the Remote Config package from your account manager, follow these steps:
- Download and unzip the package.
- In the Unity Editor, select Window > Package Manager.
- In the Package Manager window, select Add (+) to open the Add package from disk... dialog.
- Locate the package.json file inside your unzipped copy of the Remote Config package.
- Select Open to import the package into your project.
Remote Config environments
To get started, create an environment and give it a name.
- Go to the Web Dashboard.
- Select the corresponding project.
- Select Add Environment.
- Enter a name for the environment and select Create.
Note environment names are immutable.
The first environment you create is set as the default environment. This is the environment which is requested unless otherwise specified by the client. You can assign the default environment to an EnvironmentID in the Web Dashboard, or via the REST API.
Once you’ve configured your project, configure your rules and settings in the Web Dashboard
Assembly Definition References
The Remote Config package depends on Unity's authentication and core services. These dependencies require a small amount of user code for proper configuration.
To use Remote Config, you will need to include the following references:
- com.unity.remote-config-runtime
- Unity.Services.Authentication
- Unity.Services.Core
Prior to using Remote Config, you will then need to:
- Initialize Unity Services
UnityServices.InitializeAsync()
- Authenticate with Unity Authentication
AuthenticationService.Instance.SignInAnonymously()
for anonymous authenticationAuthenticationService.Instance.SignInWithAppleAsync()
for apple authenticationAuthenticationService.Instance.SignInWithFacebookAsync()
for facebook authenticationAuthenticationService.Instance.SignInWithGoogleAsync()
for google authenticationAuthenticationService.Instance.SignInWithSteamAsync()
for steam authenticationAuthenticationService.Instance.SignInWithSessionTokenAsync()
for authentication with an existing token