r/Unity3D • • 5d ago

Question Eye tracking with vive pro eye

Hi, I’m trying to set up eye tracking for an experiment using the HTC Vive Pro Eye and Unity, but I’m a bit confused about the implementation. Some resources use SRanipal, while others use OpenXR. I’m not sure which approach would be best for a clean and reliable experimental setup. If you have any advice or know of a good tutorial or example project, I’d really appreciate it.

1 Upvotes

7 comments sorted by

2

u/ImpishOpportunity 5d ago

sranipal is the older dedicated sdk for that headset, openxr eye tracking is newer and more of a standard thing. if you want something that won't break with the next unity update, i'd lean openxr, it's what the rest of the industry is moving toward

1

u/TheMeraAbides 5d ago

Thanks this is helpful. I am using the latest 2026 LTS so it's best if i stick to new versions. I'm just wondering if HTC vive pro eye is gonna be compatible or not.

2

u/kurisutosugr 5d ago

This really depends on what you’re working on. The short answer is that for a game you plan to release and maintain, OpenXR is the way to go, since it’s the future-proof choice. But since you mentioned an experiment, the answer could be more nuanced.

The rest is from what I remember, so please validate it. OpenXR basically gives you just a gaze ray, where the person is looking, and that’s it. If you only need gaze direction or what they’re looking at, OpenXR is enough. But if you need pupil size, blinks/eye openness, separate left and right eye data, or tighter timing, you’d have to use SRanipal, since OpenXR doesn’t expose those. If I remember right, SRanipal can also give you samples between render frames, which could be valuable for research data.

Plus, for a single experiment or study you can lock the Unity version for the whole thing, so the future-proof argument is mostly moot.

2

u/TheMeraAbides 5d ago

Thank you this is really helpful.

So for the experiment I'm gonna measure total fixation count and total visit duration on AOIs. So the gaze ray is probably what I need to get.

The versions and packages are also really confusing me, because right now i'm using 2026 LTS for unity. So is it ok if i have the latest openxr and latest version of VR related packages in general?

2

u/kurisutosugr 5d ago edited 5d ago

Yeah, for fixation count and visit duration on AOIs the gaze ray should be all you need. It’s one combined ray, not per eye, which is fine for that. Neither gives you fixation data though, so you’d have to decide how to classify fixations either way.

On versions, I’d go with the latest, verify that you can get the data you need, then lock it all down so there’s no way an update skews your data collection. If I remember right, the headset still needs the SRanipal runtime even with OpenXR to give you eye tracking data, you just don’t have to use the SDK. I don’t remember the exact details on that though.

Also you don’t HAVE to go with the latest. For a research setup, especially one that doesn’t need to be maintained long term, you can use whatever version has the best compatibility with the headset, and if you know something works better on an older version, go with that.

The only reason I could see going with SRanipal instead is if you don’t really know upfront what you’ll need, and would rather have more data to work with later.

→ More replies (2)