public override void BuildUI(OptionInfo option, GameObject element)
        {
            var control = element.GetComponentInChildren <UnityEngine.UI.Toggle>();

            control.isOn = option.GetPropertyValue <bool>();
            control.onValueChanged.AddListener(value => option.SetPropertyValue(value));
        }
Example #2
0
        public override void BuildUI(OptionInfo option, GameObject element)
        {
            var control = element.GetComponentInChildren <UnityEngine.UI.InputField>();

            control.text = option.GetPropertyValue <string>();
            control.onValueChanged.AddListener(value => option.SetPropertyValue(value));
        }
Example #3
0
        public override void BuildUI(OptionInfo option, GameObject element)
        {
            var sliderObj = element.GetComponentInChildren <UnityEngine.UI.Slider>();

            sliderObj.minValue = Min;
            sliderObj.maxValue = Max;
            sliderObj.value    = option.GetPropertyValue <float>();
            sliderObj.onValueChanged.AddListener(value => option.SetPropertyValue(value));
        }
Example #4
0
 public virtual void SaveValue(OptionInfo option, string selectionValue, int index)
 {
     option.SetPropertyValue(selectionValue);
 }