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)); }
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)); }
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)); }
public virtual void SaveValue(OptionInfo option, string selectionValue, int index) { option.SetPropertyValue(selectionValue); }