public void StopVisualizingGaze() { OnUpdate -= VisualizeGaze; _markerLeftEye.SetActive(false); _markerRightEye.SetActive(false); _markerGazeCenter.SetActive(false); _gaze3D.SetActive(false); // PupilTools.UnSubscribeFrom("gaze"); }
public void StartVisualizingGaze() { OnUpdate += VisualizeGaze; bool isCalibrationMode2D = Settings.calibration.currentCalibrationMode == Calibration.CalibMode._2D; _markerLeftEye.SetActive(isCalibrationMode2D); _markerLeftEye.SetMaterialColor(Color.blue); _markerRightEye.SetActive(isCalibrationMode2D); _markerRightEye.SetMaterialColor(Color.red); _markerGazeCenter.SetActive(isCalibrationMode2D); _markerGazeCenter.SetMaterialColor(Color.magenta); _gaze3D.SetActive(!isCalibrationMode2D); if (isCalibrationMode2D) { PupilTools.SubscribeTo("gaze"); } else { PupilTools.SubscribeTo("pupil."); } }
public static void StopCalibration() { Settings.calibration.initialized = false; Settings.dataProcess.state = PupilSettings.EStatus.Idle; Settings.connection.sendRequestMessage(new Dictionary <string, object> { { "subject", "calibration.should_stop" } }); calibrationMarker.SetActive(false); // SetDetectionMode (currentCalibrationType.name); if (OnCalibrationEnded != null) { OnCalibrationEnded(); } else { print("No 'calibration ended' delegate set"); } }