O'Reilly logo

HoloLens Beginner’s Guide by Jason Odom

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

OnFocusEvent component

TheOnFocusEvent component is set up to handle our gaze. It has two modes: Focus Enter and Focus Lost. Here, we will need to add the component and then set up our object to work with it. 

Click on Add Component in the inspector on the LeftRect object. Type in OnFocusEnter and select the OnFocusEnter component:

When the OnFocusEnter component appears, you will see two boxes with plus and minus signs under them. Click on the plus sign for each box:

Now you will see two boxes appear, looking for GameObjects. Simply drag the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required