示例#1
0
    public void OnMessage(OSCMessage msg)
    {
        Debug.Log("setup recieving typetag " + msg.typeTag);
        if (!msg.Address.StartsWith(messagePrefix))
        {
            return;
        }
        if (msg.typeTag.StartsWith(",si"))
        {
            string adr   = null;
            int    index = 0;
            adr = msg.GetString(ref index);
            int port = msg.GetInt(ref index);

            if (targetSelector.valueSource != null)
            {
                targetSelector.valueSource.AddTarget(adr, port);
            }
            Debug.Log("^trying to ad target  " + adr + ":" + port);
        }
    }