How do I use the mouse to simulate eye movements on Unity, and export some eyetracking data from Hololens 2?

cy lai 20 Reputation points
2024-01-16T11:50:06.6166667+00:00

Hi, I will be working on an experiment using hololens2. In this experiment, I need to get the eye tracking data of the participant. I have a few questions about this experiment setup: (I'm using Unity2021.3 for this setup)

  1. I've done some research and it seems that "IMixedRealityEyeGazeProvider" can help me with this, but I'd like to know on which object this script can be assigned.
  2. What should I import to get "CoreServices.InputSystem.EyeGazeProvider"?
  3. I followed the instructions on Microsoft's website to set up the eye movement settings, but I don't know how to start using the mouse to simulate eye movements and output data such as coordinates and timestamp.
  4. Do I need to write my own extra code? Or should I just import the right tools and complete the design?
HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
386 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ying Li - MSFT 810 Reputation points Microsoft Vendor
    2024-01-18T06:37:45.83+00:00

    Hello, Welcome to Microsoft Q&A,

    Enable simulated eye tracking using mouse:

    • Click on the 'Input' tab in your MRTK configuration profile.
    • From there, navigate to 'Input Data Providers' -> 'Input Simulation Service'.
    • Clone the 'DefaultMixedRealityInputSimulationProfile' to make changes to it.
    • Select the ‘Mouse’ in the 'Default Eye Gaze Simulation Mode' setting. Picture1

    IMixedRealityEyeGazeProvider is an interface in the Microsoft Mixed Reality Toolkit (MRTK) and is not directly assigned to any object. 

    To use CoreServices.InputSystem.EyeGazeProvider in your MonoBehaviour script, You need to import the following namespace at the top of your script: using Microsoft.MixedReality.Toolkit;

    Yes, to export the eye tracking data, you need to write some additional code. The exact code will depend on your specific requirements.

    For more information about eye gaze provider, you can refer to Eye Tracking Eye Gaze Provider - MRTK 2 | Microsoft Learn.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful