com.iron-mountain.remote-configuration
v1.1.5
Published
A library for interfacing with Unity's built in Remote Config service. SOME CODING REQUIRED Unity's Remote Config service is an awesome solution that I've used across multiple projects, but it requires some boilerplate code to get up and running. This p
Downloads
15
Readme
Remote Configuration
Version: 1.1.4
Description:
A library for interfacing with Unity's built in Remote Config service.
SOME CODING REQUIRED
Unity's Remote Config service is an awesome solution that I've used across multiple projects, but it requires some boilerplate code to get up and running. This package contains those scripts that I use to make it work.
Use Cases:
- Quickly standing up Unity's Remote Config service.
- An improved system for switching environments at runtime.
- An improved system for handling and using remote config variables in scripts.
Dependencies:
- com.unity.remote-config (3.3.2)
Directions for Use:
- Place the RemoteConfigurationManager on a gameobject in your scene. This component is responsible for initializing the service and setting the environment.
- If you want the RemoteConfigurationManager to initialize the environment (you probably do):
- Check the box for "Initialize Environment on Awake"
- Create a ScriptedRemoteConfigurationEnvironment instance (Create > Scriptable Objects > Remote Config Environment).
- Copy your environment ID for the remote config dashboard into this object.
- Drag the ScriptedRemoteConfigurationEnvironment onto the RemoteConfigurationManager into the "Initialization Environment" property.
- There are 2 new ways to access your remote configuration variables:
- Create an instance of RemoteSetting in a script: RemoteSetting mySetting = new RemoteSetting("key", "default value"); string value = mySetting.Value; mySetting.OnValueChanged += ValueChangedHandler;
- Add a RemoteSettingMonobehaviour onto a gameobject, and configure the key and defaultValue fields. In another script: RemoteSettingMonobehaviour mySetting; string value = mySetting.Value; mySetting.OnValueChanged += ValueChangedHandler;
Package Mirrors:
Key Scripts & Components:
- public struct AppAttributes
- public class EnvironmentIDText : MonoBehaviour
- public interface IRemoteSetting
- Properties:
- public String Key { get; }
- public String DefaultValue { get; }
- public String Value { get; }
- Properties:
- public class RemoteConfigurationManager : MonoBehaviour
- public class RemoteSetting
- Actions:
- public event Action OnValueChanged
- Properties:
- public String Key { get; }
- public String DefaultValue { get; }
- public String Value { get; }
- Actions:
- public class RemoteSettingMonoBehaviour : MonoBehaviour
- Properties:
- public String Key { get; }
- public String DefaultValue { get; }
- public String Value { get; }
- Properties:
- public class ScriptedRemoteConfigurationEnvironment : ScriptableObject
- Properties:
- public String EnvironmentID { get; }
- Methods:
- public void ActivateEnvironment()
- Properties:
- public struct UserAttributes