void ReceiveGaze(GazeData gazeData) { unityTime = timeSync.ConvertToUnityTime(gazeData.PupilTimestamp); if (gazeData.MappingContext != GazeData.GazeMappingContext.Binocular) { isBinocular = false; } else { isBinocular = true; } gazeConfidence = gazeData.Confidence; if (gazeData.IsEyeDataAvailable(0)) { gazeNormalLeft = gazeData.GazeNormal0; } if (gazeData.IsEyeDataAvailable(1)) { gazeNormalRight = gazeData.GazeNormal1; } }
public double ConvertToUnityTime(double pupilTimestamp) { if (!IsConnected) { Debug.LogWarning("Not connected"); return(0); } return(timeSync.ConvertToUnityTime(pupilTimestamp)); }