Home › Forums › Eye Tracking Devices › Eye tracker 4C- Can I get the eye tracker name in Unity using C#?
Tagged: c++, Eye Tracker 4C, name, Unity, version, wrapper file
- This topic has 3 replies, 2 voices, and was last updated 5 years, 11 months ago by Alex [Tobii].
- AuthorPosts
- 23/10/2018 at 01:11 #8942Supriya RaulParticipant
Hello,
I need to get the eye tracker details to create a Unity C# wrapper file so that if I use multiple eye-trackers I can run the same code and fetch the same details. Please suggest how can I find the eye tracker name and version?
Thanks in advance.
23/10/2018 at 09:45 #8943Alex [Tobii]ParticipantHi @supriya !
Unfortunately, there’s no such a feature in the public API of Tobii Unity SDK.
Underlying code will use the tracker that tracks a monitor, which game window is currently on.
There’s some undocumented code in the underlying API though, but it’s subject to change, so use it on your own risk.
Please look at
\Assets\Tobii\Framework\Internal\TobiiHost.csprivate void TrackWindow() ... TobiiGameIntegrationApi.TrackWindow(_gameViewBoundsProvider.Hwnd);
This one tells which window to track. You can also track certain rectangle or tracker by url
andpublic DisplayInfo DisplayInfo ... var trackerInfo = TobiiGameIntegrationApi.GetTrackerInfo();
This one provides info about current tracker
To enumerate all connected trackers:
TobiiGameIntegrationApi.UpdateTrackerInfos(); List<TrackerInfo> trackerInfos; var timeout = Stopwatch.StartNew(); while ((trackerInfos = TobiiGameIntegrationApi.GetTrackerInfos()).IsNull()) { if (timeout.ElapsedMilliseconds > 10000) { throw new Exception("TGI error. Could not enumerate trackers."); } }
23/10/2018 at 19:15 #8945Supriya RaulParticipantThank you for this suggestion Alex. However, TobiiGameIntegrationApi.GetTrackerInfo() is giving the firmware version and generation details which is not that useful.
Do you mean to say that it is possible to fetch the eye tracker name and hardware version details from any other language or SDK?
If even that is possible, I can fetch those details from there and create a DLL to pass those details to my Unity C# script.
I would really appreciate some more help here.23/10/2018 at 19:51 #8946Alex [Tobii]ParticipantPlease check this thread:
https://developer.tobii.com/community/forums/topic/how-to-get-device-software-info/ - AuthorPosts
- You must be logged in to reply to this topic.