diff --git a/unity_pupil_plugin_vr/Assets/pupil_plugin/Scripts/CalibrationDemo.cs b/unity_pupil_plugin_vr/Assets/pupil_plugin/Scripts/CalibrationDemo.cs index a7982c1b..2a768e00 100644 --- a/unity_pupil_plugin_vr/Assets/pupil_plugin/Scripts/CalibrationDemo.cs +++ b/unity_pupil_plugin_vr/Assets/pupil_plugin/Scripts/CalibrationDemo.cs @@ -12,4 +12,13 @@ void OnEnable() print ("We are gazing"); } } + + void OnDisable() + { + if (PupilTools.IsConnected) + { + PupilGazeTracker.Instance.StopVisualizingGaze (); + print ("Stop visualizing gaze"); + } + } } diff --git a/unity_pupil_plugin_vr/Assets/pupil_plugin/Scripts/Pupil/PupilGazeTracker.cs b/unity_pupil_plugin_vr/Assets/pupil_plugin/Scripts/Pupil/PupilGazeTracker.cs index 2d11ac15..74ec0262 100644 --- a/unity_pupil_plugin_vr/Assets/pupil_plugin/Scripts/Pupil/PupilGazeTracker.cs +++ b/unity_pupil_plugin_vr/Assets/pupil_plugin/Scripts/Pupil/PupilGazeTracker.cs @@ -235,7 +235,7 @@ public void StopVisualizingGaze () PupilMarker.TryToSetActive(_markerGazeCenter,false); PupilMarker.TryToSetActive(_gaze3D,false); - PupilTools.IsIdle = true; + // PupilTools.IsIdle = true; // PupilTools.UnSubscribeFrom("gaze"); }