public void Start()
        {
            m_parameter = GetComponent <Parameter_List>();
            m_parameter.OnValueChanged += delegate { OnValueChanged(); };

            if (IndexNameOverride == "")
            {
                IndexNameOverride = m_parameter.Name;
            }
            if (DeltaNameOverride == "")
            {
                DeltaNameOverride = IndexNameOverride + "_delta";
            }
            if (LabelNameOverride == "")
            {
                LabelNameOverride = IndexNameOverride + "_label";
            }

            m_indexVariable = new OSC_IntVariable(IndexNameOverride, 0, m_parameter.Count - 1);
            m_indexVariable.OnDataReceived += OnReceivedOSC_Data_Index;

            m_deltaVariable = new OSC_IntVariable(DeltaNameOverride, -1, 1);
            m_deltaVariable.OnDataReceived += OnReceivedOSC_Data_Delta;

            m_labelVariable = new OSC_StringVariable(LabelNameOverride);

            m_updating = false;
        }
Example #2
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;
        }