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); }
/// <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); }
// 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(); } } }
void Start() { client = new UnityOSC.OSCClient(System.Net.IPAddress.Parse(targetIP), targetPort); }