Beispiel #1
0
    private void Start()
    {
        EyetrackingManager _eyetrackingManager = EyetrackingManager.Instance;

        _hmdTransform = EyetrackingManager.Instance.GetHmdTransform();
        _isRunning    = false;
    }
Beispiel #2
0
    void Start()
    {
        SceneManager.sceneLoaded += OnSceneLoaded;
        _recordedEyeTrackingData  = new List <EyeTrackingDataFrame>();

        _eyetrackingManager = EyetrackingManager.Instance;

        _sampleRate   = _eyetrackingManager.GetSampleRate();
        _hmdTransform = _eyetrackingManager.GetHmdTransform();
    }
Beispiel #3
0
    private void Awake()
    {
        SceneManager.sceneLoaded += OnSceneLoaded;
        _sampleRate = 1f / SetSampleRate;
        //singleton pattern a la Unity
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);         //the Eyetracking Manager should be persitent by changing the scenes maybe change it on the the fly
        }
        else
        {
            Destroy(gameObject);
        }


        //  I do not like this: we still needs tags to find that out.
    }
Beispiel #4
0
    // Start is called before the first frame update
    void Start()
    {
        _eyetrackingManager = EyetrackingManager.Instance;
        _eyetrackingManager.NotifyEyeValidationCompletnessObservers += HandleEyeValidationCompletnessStatus;

        resettetCountdown = validationCountdown;
        _fixationDot      = relativeFixedPoint.GetComponent <FixationDot>();

        _fixationDot.NotifyFixationTimeObservers += HandleFixationCountdownNumber;
        _fixationDot.NotifyLeftTargetObservers   += HandleLeftFixation;

        participantHeight = _eyetrackingManager.GetHmdTransform().transform.position.y;

        fixationPoint.transform.position = new Vector3(fixationPoint.transform.position.x, participantHeight, fixationPoint.transform.position.z);
        SuccessfulValidation.gameObject.SetActive(false);
        runningValidation    = false;
        ValidationSuccessful = false;
        FailedValidationText.gameObject.SetActive(false);
    }