Home Forums Software Development GUI Button and Gaze Aware

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #3845

    I am trying to setup the Gaze Aware Component with a GUI Repeat Button, but I am not quite sure how to do this. I can get the GUI button to work with the mouse fine, but I’m not sure how to get the GAC to act on the button. I guess what I”m saying is it would be similar to using buttons in a mobile setting, just with a different component. What I want it to do, is when you look at the GUI button, it moves an object. The move method does not concern me here, just rather how to get the GUI to recognize the Gaze Aware component…I’m not sure if anyone can help with this here, but I would be greatly appreciative of any input.

    Jenny [Tobii]

    Hi Richard,

    The GazeAwareComponent only works with game object’s that have either a BoxCollider or Renderer we can use to calculate the object’s projected bounds on the screen.

    With GUI buttons you have to do more manual work to get them GazeAware.

    Check out the ActivatableGUI demo scene included in the EyeX SDK for Unity package. It shows how to attach the EyeXActivatable behavior to a GUI.button (in TitleGUI.cs). I guess this should be very similar how you would do it with a GUI.RepeatButton.

    Instead of adding the EyeXActivatable behavior to the button interactor, you add the EyeXGazeAware behavior:
    repeatButtonInteractor.EyeXBehaviors.Add(new EyeXGazeAware() { DelayTime = delayInMilliseconds });

    When all is setup, you will be able to read if the player is looking at the button by checking if repeatButtonInteractor.HasGaze().


    Well I was fortunately able to use quads as buttons on screen, which worked remarkably well as I can adjust the height of the buttons to the game object it’s controlling to custom size the play area. I know GUI buttons would work, but I found a much faster and easy way of making the buttons so that I can easily implement images and textures on the buttons in the editor rather than in code. This saved me a lot of time. Although again I appreciate your input very much, and I will have to consider this as I continue developing.


    Hello, I am trying to achieve the same thing but i cannot find ActivatableGUI demo scene??
    I only have :

    Where to find it?
    Thank you?

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