diff --git a/Unity/Eye Tracking.prefab.meta b/Unity/Eye Tracking.prefab.meta deleted file mode 100644 index b6a4bfd..0000000 --- a/Unity/Eye Tracking.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 54bd40eff5fb35b448e54d968d9ff9bf -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity/EyeTracking.cs b/Unity/EyeTracking.cs index d55babb..eb7d1e9 100644 --- a/Unity/EyeTracking.cs +++ b/Unity/EyeTracking.cs @@ -20,16 +20,10 @@ public class EyeTracking : MonoBehaviour [Header("Gaze calibration settings")] public VarjoEyeTracking.GazeCalibrationMode gazeCalibrationMode = VarjoEyeTracking.GazeCalibrationMode.Fast; public KeyCode calibrationRequestKey = KeyCode.Space; + public bool LogAfterCalibration = true; - [Header("Start logging after calibration")] - public bool BeginLogging = true; - - [Header("Gaze output filter settings")] - public VarjoEyeTracking.GazeOutputFrequency gazeOutputFrequency = VarjoEyeTracking.GazeOutputFrequency.Frequency100Hz; - - [Header("Gaze output filter settings")] - public VarjoEyeTracking.GazeOutputFilterType gazeOutputFilterType = VarjoEyeTracking.GazeOutputFilterType.None; - public KeyCode setOutputFilterTypeKey = KeyCode.RightShift; + [Header("Gaze output frequency setting (if available)")] + public VarjoEyeTracking.GazeOutputFrequency gazeOutputFrequency = VarjoEyeTracking.GazeOutputFrequency.MaximumSupported; [Header("Toggle gaze target visibility")] public bool showGazeTarget = false; @@ -141,8 +135,9 @@ private void Start() VarjoEyeTracking.SetGazeOutputFrequency(gazeOutputFrequency); Debug.Log("Gaze output frequency is now: " + VarjoEyeTracking.GetGazeOutputFrequency()); + //make sure filtering is off + VarjoEyeTracking.GazeOutputFilterType gazeOutputFilterType = VarjoEyeTracking.GazeOutputFilterType.None; VarjoEyeTracking.SetGazeOutputFilterType(gazeOutputFilterType); - Debug.Log("Gaze output filter type is now: " + VarjoEyeTracking.GetGazeOutputFilterType()); //Hiding the gazetarget if gaze is not available or if the gaze calibration is not done if (VarjoEyeTracking.IsGazeAllowed() && VarjoEyeTracking.IsGazeCalibrated() && showGazeTarget) @@ -167,10 +162,10 @@ private void Start() void Update() { // start loggin when calibration is finished - if (VarjoEyeTracking.IsGazeAllowed() && VarjoEyeTracking.IsGazeCalibrated() && BeginLogging == true) + if (VarjoEyeTracking.IsGazeAllowed() && VarjoEyeTracking.IsGazeCalibrated() && LogAfterCalibration == true) { StartLogging(); - BeginLogging = false; + LogAfterCalibration = false; } // Request gaze calibration @@ -178,14 +173,6 @@ void Update() { VarjoEyeTracking.RequestGazeCalibration(gazeCalibrationMode); } - - // Set output filter type - if (Input.GetKeyDown(setOutputFilterTypeKey)) - { - VarjoEyeTracking.SetGazeOutputFilterType(gazeOutputFilterType); - Debug.Log("Gaze output filter type is now: " + VarjoEyeTracking.GetGazeOutputFilterType()); - } - // Check if gaze is allowed if (Input.GetKeyDown(checkGazeAllowed)) {