Create an Empty GameObject and name it uiController. We now need to create a UI Controller script that will handle the user interaction. Create a new C# script and name it UiController.cs.
A listing of the UI controller is as follows:
using UnityEngine; using UnityEngine.UI; namespace com.noorcon.rpg2e { public class UiController : MonoBehaviour { public RectTransform OptionsPanel; public Slider ControlMainVolume; public Slider ControlFXVolume; public void Update() { } public void DisplaySettings() { GameMaster.instance.DisplaySettings = !GameMaster.instance.DisplaySettings; OptionsPanel.gameObject.SetActive(GameMaster.instance.DisplaySettings); ...