Dispatches OSC messages to the specified destination address and port.
コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: benkuper/SoftLove
        private void updateClient()
        {
            if (client != null) client.Close();
            client = new OSCClient(ip, port, true);

            this.viewModel.StatusMessage = string.Format("Client set to {0}:{1}\n", ip, port);
        }
コード例 #2
0
    /// <summary>
    /// Creates an OSC client.
    /// </summary>
    /// <param name="server">The server to connect the client to.</param>
    /// <returns></returns>
    public OSCClient CreateClient(string server)
    {
        OscManager.DistantOsc oscDestination = this.GetOscDistantServer(server);

        IPAddress ip = IPAddress.Parse(oscDestination.ip);
        OSCClient c  = new UnityOSC.OSCClient(ip, (int)(oscDestination.port));

        this._localClients.Add(c);
        return(c);
    }
コード例 #3
0
    // Use this for initialization
    public void Awake()
    {
        this.findNodes();

        this.oscManager = GameObject.Find("OscManager").GetComponent <OscManager> ();
        this.oscClient  = this.oscManager.CreateClient("drones");

        if (Application.isPlaying)
        {
            if (this._lpsNodes.Count < this.lpsNodesPositions.Length)
            {
                this.RecreateNodes();
            }
        }
    }
コード例 #4
0
 void Start()
 {
     client = new UnityOSC.OSCClient(System.Net.IPAddress.Parse(targetIP), targetPort);
 }