Example #1
0
        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());
        }
Example #2
0
        void Update()
        {
            if (Time.frameCount == _lastUpdatedFrame)
            {
                return;
            }

            _lastUpdatedFrame = Time.frameCount;

            TrackWindow();

            var gameViewBounds = _gameViewBoundsProvider.GetGameViewClientAreaNormalizedBounds();

            _gameViewInfo = new GameViewInfo(gameViewBounds);

            TobiiGameIntegrationApi.Update();

            _gazeFocus.UpdateGazeFocus();
        }