Integrating Game Overrides into gameplay
Now that we can see how to get those values and how the system works, let’s see how we can actually integrate it with our project and have it affect gameplay:
- Open up the gameplay scene if it isn’t open already, and create a new GameObject by going to GameObject | Create Empty. Name the new object
Remote Config Managerand reset its position. - Then, from the Project window, go to the
Assets\Scriptsfolder and create a new C# script calledRemoteConfigManager. - Attach the newly created
RemoteConfigManagercomponent to theRemoteConfigManagerobject we created in step 1. If all went well, your project should look similar to the following screenshot.
Figure 11.10: Adding RemoteConfigManager
- Back in the Project window, double-click on the
RemoteConfigManagerscript to open it with the script editor of your choice and replace its script with the following:using UnityEngine; using...