protected virtual void Start() { base.StateChangeHandler += onStateChanged; if (m_dataBinder != null) { SetPositionFromFraction(m_dataBinder.GetCurrentData()); } }
// Stop listening to any previous data binder and start listening to the new one. public void RegisterDataBinder(LMWidgets.DataBinder <LMWidgets.SliderBase, float> dataBinder) { if (dataBinder == null) { return; } UnregisterDataBinder(); m_dataBinder = dataBinder as DataBinderSlider; SetPositionFromFraction(m_dataBinder.GetCurrentData()); }