Пример #1
0
        public void Start()
        {
            m_dropdown = GetComponent <Dropdown>();
            m_dropdown.onValueChanged.AddListener(OnValueChanged);

            m_indexVar = new OSC_FloatVariable(indexVariableName, -0.5f, m_dropdown.options.Count);
            m_indexVar.OnDataReceived += OnReceivedOSC_Data;

            m_labelVar = new OSC_StringVariable(labelVariableName);

            m_updating = false;
        }
        public void Start()
        {
            m_slider = GetComponent <Slider>();
            m_slider.onValueChanged.AddListener(delegate { OnSliderChanged(); });

            m_variable       = new OSC_FloatVariable();
            m_variable.Name  = variableName;
            m_variable.Min   = m_slider.minValue;
            m_variable.Max   = m_slider.maxValue;
            m_variable.Value = m_slider.value;

            m_variable.OnDataReceived += OnReceivedOSC_Data;

            m_updating = false;
        }
Пример #3
0
        public void Start()
        {
            m_parameter = GetComponent <Parameter_Double>();
            m_parameter.OnValueChanged += delegate { OnValueChanged(); };

            if (NameOverride == "")
            {
                NameOverride = m_parameter.Name;
            }

            m_variable = new OSC_FloatVariable(NameOverride,
                                               (float)(Normalise ? 0 : m_parameter.LimitMin),
                                               (float)(Normalise ? 1 : m_parameter.LimitMax));
            m_variable.Value = (float)GetParameterValue();

            m_variable.OnDataReceived += OnReceivedOSC_Data;

            m_updating = false;
        }