private static bool TryConnectToTracker(StreamEngineConnection connection, Stopwatch stopwatch, StreamEngineTracker_Description description) { StartStopwatch(stopwatch); if (connection.Open(description) == false) { return(false); } var elapsedTime = StopStopwatch(stopwatch); UnityEngine.Debug.Log(string.Format("Connected to SE tracker: {0} and it took {1}ms", connection.Context.Url, elapsedTime)); return(true); }
private static bool TryConnectToTracker(FieldOfUse fieldOfUse, StreamEngineConnection connection, Stopwatch stopwatch, StreamEngineTracker_Description description) { StartStopwatch(stopwatch); try { if (connection.Open(fieldOfUse, description) == false) { return(false); } } catch (Exception e) { UnityEngine.Debug.LogError("Error connecting to eye tracker: " + e.ToString()); return(false); } var elapsedTime = StopStopwatch(stopwatch); UnityEngine.Debug.Log(string.Format("Connected to SE tracker: {0} and it took {1}ms", connection.Context.Url, elapsedTime)); return(true); }