public void ToggleSlider(ButtonDemoToggle clickedButton) { //Debug.Log ("Toggle clickedButton: " + PathName.Path (clickedButton.gameObject)); SliderDemo sliderToToggle = ToggleSliderlDictionary[clickedButton]; //toggle the slider sliderToToggle.gameObject.SetActive(!sliderToToggle.gameObject.activeSelf); }
public void init(LiveLink live, string liveId, string name, string liveParent, float minimum, float maximum, float startValue) { m_slider = gameObject.GetComponentInChildren<SliderDemo>(); m_dataBinder = gameObject.GetComponent<SliderToLiveDataBinder>(); m_dataBinder.init(this, m_slider, startValue.Map(minimum, maximum, 0.0f, 1.0f)); min = minimum; max = maximum; if (m_label != null) m_label.text = name; base.init(live, liveId, name, liveParent); }