示例#1
0
    public void Awake()
    {
        _eyeXHost = EyeXHost.GetInstance();
        _fixationDataProvider = _eyeXHost.GetFixationDataProvider(fixationDataMode);

        #if UNITY_EDITOR
        _oldFixationDataMode = fixationDataMode;
        #endif
    }
    public void Awake()
    {
        _eyeXHost             = EyeXHost.GetInstance();
        _fixationDataProvider = _eyeXHost.GetFixationDataProvider(fixationDataMode);

#if UNITY_EDITOR
        _oldFixationDataMode = fixationDataMode;
#endif
    }
    /// <summary>
    /// Draw a GUI.Box at the user's fixation point.
    /// </summary>
    public void OnGUI()
    {
#if UNITY_EDITOR
        if (_oldFixationDataMode != fixationDataMode)
        {
            _fixationDataProvider.Stop();
            _oldFixationDataMode  = fixationDataMode;
            _fixationDataProvider = _eyeXHost.GetFixationDataProvider(fixationDataMode);
            _fixationDataProvider.Start();
        }
#endif

        var fixationPoint = _fixationDataProvider.Last;
        if (fixationPoint.IsValid)
        {
            if (FixationDataEventType.Begin == fixationPoint.EventType)
            {
                _fixationCount++;
            }

            //DrawGUI(fixationPoint.GazePoint, pointSize, pointColor, _fixationCount.ToString());
        }
    }
 protected void Awake()
 {
     _eyexHost     = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetFixationDataProvider(fixationDataMode);
 }
 protected void Awake()
 {
     _eyexHost = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetFixationDataProvider(fixationDataMode);
 }