Exemplo n.º 1
0
        void OnEnable()
        {
            m_Target   = (OscReceiver)target;
            m_PortProp = serializedObject.FindProperty("m_Port");

            SortAddresses();
        }
Exemplo n.º 2
0
        void OnEnable()
        {
            if (m_Receiver == null)
            {
                m_Receiver = GetComponentInParent <OscReceiver>();
            }

            if (m_Registered || string.IsNullOrEmpty(Address))
            {
                return;
            }

            if (m_Receiver != null && m_Receiver.Server != null)
            {
                m_ActionPair = new OscActionPair(ValueRead, InvokeEvent);
                Receiver.Server.TryAddMethodPair(Address, m_ActionPair);
                m_Registered = true;
            }
        }