private void ThreadConnect() { EyeLink _el = new EyeLink(); _el.setEyelinkAddress(IP, -1); threadRunning = true; while (threadRunning) { if (!elOnline) { try { //Debug.Log("Trying to connect"); _el.broadcastOpen(); } catch { } if (_el.isConnected()) { elOnline = true; threadRunning = false; continue; } } } }
// Start is called before the first frame update void Start() { eyecal = gameObject.AddComponent <EyeCalibration>(); gazeProcess = gameObject.AddComponent <GazeProcessing>(); gazeView = gameObject.AddComponent <GazeView>(); el = new EyeLink(); el_Util = new EyeLinkUtil(); checker = new EyeLinkChecker(); // Add Listeners EventsController.OnEyeCalibrationUpdate += gazeProcess.UpdateCalibration; EventsController.OnEyeCalibrationUpdate += eyecal.UpdateCalibration; }