void Update() { if (_gameViewBoundsProvider.Hwnd != IntPtr.Zero) { Interop.SetWindow(_gameViewBoundsProvider.Hwnd); if (!_isConnected) { Interop.Start(false); _gazePointDataProvider.Disconnect(); _headPoseDataProvider.Disconnect(); _isConnected = true; } } SyncData(); var gameViewBounds = _gameViewBoundsProvider.GetGameViewClientAreaNormalizedBounds(); _gameViewInfo = new GameViewInfo(gameViewBounds); _gazeFocus.UpdateGazeFocus(); StartCoroutine(DoEndOfFrameCleanup()); }
void Update() { if (Time.frameCount == _lastUpdatedFrame) { return; } _lastUpdatedFrame = Time.frameCount; TrackWindow(); var gameViewBounds = _gameViewBoundsProvider.GetGameViewClientAreaNormalizedBounds(); _gameViewInfo = new GameViewInfo(gameViewBounds); TobiiGameIntegrationApi.Update(); _gazeFocus.UpdateGazeFocus(); }