[Solved] Turn On/Off Tobii device from code Unity

Home Forums Software Development [Solved] Turn On/Off Tobii device from code Unity

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #3067
    Vardan Meliksetyan
    Participant

    Hi tobii community.
    I have question about mouse right click-> Disable Eye Tracking.
    I want to write code in Unity, where user or in Awake() function I can turn on device lights. I can’t find info about it in docs. Can you help with info or link.
    Thank you.

    #3095
    Jenny [Tobii]
    Participant

    Hi Vardan,

    There is no API call to enable eye tracking when a user has disabled it. You have to let the users decide themselves if they want to enable eye tracking when running your game. You can check if eye tracking is disabled and advice the user to enable the eye tracker to be able to use your game/or the gaze-enabled features of your game. In the EyeXFramework included in the EyeX SDK for Unity there is a property called EyeTrackingDeviceStatus on the EyeXHost, and this will have the value “Disabled” when eye tracking is disabled. When eye tracking is ready for use the value is “Tracking” (meaning that the user’s eye-gaze is being tracked).

    Note also that it is not only when eye tracking is disabled that the lights on the eye tracker is off – if there is no client application to the EyeX Engine running, the lights will also be switched off.

    #3097
    Vardan Meliksetyan
    Participant

    Thank you Jenny.

    #5971
    Carlos
    Participant

    Hello,
    How can I check if eye tracking is disabled with C API? I can’t find an equivalent function.
    Thank you

    #5978
    Grant [Tobii]
    Keymaster

    Hi @cchirive,

    IF you check out Page 11 of the Developers Guide for EyeX SDK in C/C++, there we discuss the Connection State which I think should be suitable for your needs.

    #5979
    Carlos
    Participant

    Hi,
    I’m working with C examples you provide, I’ve already seen how “txEnableConnection” function works, but with this I don’t know if EyeX is enabled or not.
    The connection is stablished and EyeX state changes to TX_CONNECTIONSTATE_CONNECTED even if EyeX is has been disabled by user.

    #5991
    Grant [Tobii]
    Keymaster

    Hi @cchirive,

    Sorry for the delay. We do indeed have something similar which is is mentioned on page 28 of the Developer’s Guide and how to use it is exemplified in the MinimalStatusNotifications sample.

    I suggest you look at the TX_STATEPATH_EYETRACKINGSTATE in the MinimalStatusNotifications.c file.

    #5996
    Carlos
    Participant

    Hi,
    It works fine
    Thanks

    #6008
    Grant [Tobii]
    Keymaster

    Great, thanks for the update.

    #7031
    GoodSpeed
    Participant

    any update this method in the new sdk?

    #7050
    Grant [Tobii]
    Keymaster

    Hi @guspid, the function is still available in the latest iterations of the SDK for Unity, .NET. To what flavor were you referring?

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.