示例#1
0
    public static void Send(this ISendOSC sender, string address, float value)
    {
        OSCMessage message = new OSCMessage(address);

        message.Append(value);
        sender.Send(message);
    }
示例#2
0
    public static void Send(this ISendOSC sender, string address, string targetIP, int targetPort)
    {
        OSCMessage message = new OSCMessage(address);

        message.Append(targetIP);
        message.Append(targetPort);
        sender.Send(message);
    }
示例#3
0
    public static void Send(this ISendOSC sender, string address, params object[] payload)
    {
        OSCMessage message = new OSCMessage(address);

        foreach (var ob in payload)
        {
            message.Append(ob);
        }
        sender.Send(message);
    }
    // void Recieveint(int i)
    // {
    //     slider.value = i;
    //     Debug.Log(name + " " + OSCAddress + "  Recieved value " + i);
    //     SetSliderValue(i);
    // }

    void OnNewSliderValue(float f)
    {
        if (lastSentValue == f)
        {
            return;
        }
        lastSentValue = f;
        if (sender != null)
        {
            sender.Send(OSCAddress, f);
        }
    }
示例#5
0
 public void RequestSetup()
 {
     sender = selector.valueSource;
     if (sender == null)
     {
         Debug.Log("no sender");
     }
     else
     {
         string     addr    = zBench.GetIPAddress();
         OSCMessage message = new OSCMessage("/setup/" + listenerType);
         message.Append(addr);
         message.Append(portToRequest);
         sender.Send(message);
     }
     // OSCSenderSelector.
 }
示例#6
0
    public static void Send(this ISendOSC sender, string address)
    {
        OSCMessage message = new OSCMessage(address);

        sender.Send(message);
    }