void Start() { // Get the global RTClient object from the Qualisys system rtClient = RTClient.GetInstance(); // Loop through discovered servers to find one that matches our needs foreach (var discoveryResponse in rtClient.GetServers()) { // Check if the response has the right IP address if (discoveryResponse.IpAddress == host) { Debug.Log("Desired Host Found"); server = discoveryResponse; foundServer = true; } Debug.Log(discoveryResponse.IpAddress); // else{ // Debug.Log("Desired Host not found"); // } } // If a server is found at the correct host, connect to the server if (foundServer) { rtClient.Connect(server, 4545, true, true, false, false, false); } }
// Start is called before the first frame update void Start() { rtClient = RTClient.GetInstance(); // Loop through discovered servers to find one that matches our needs foreach (var discoveryResponse in rtClient.GetServers()) { if (discoveryResponse.IpAddress == host) { Debug.Log("Desired Host Found"); server = discoveryResponse; foundServer = true; } } // Maybe do something on update to attempt again? if (foundServer) { rtClient.Connect(server, 4545, true, true, false, false, false, false); } }