Skip to content

Example Scripts

Adrian Wennberg edited this page Dec 15, 2021 · 3 revisions

There are several example scripts part of BDK. These can be separated into three different categories: Hands, voice, head gaze and eye gaze. Example classes are found in the BDK Essentials sample package.

Hands

FloatingMenu

A simple script that allows a floating menu to follow the player. If the player grabs it and moves it it will stay in place.

HandMenuExample

A simple script that allows a menu to be shown on the inner side of the hand when the palm is facing the HoloLens.

InteractableButton

A simple button script.

DrapeMenu

A simple script that allows a menu to be shown on the inner side of the hand when the palm is facing the HoloLens. This menu can be expanded by pulling on a tab.

PinchSlider

A setup script for a slider object.

Slider

A script that allow a game object to be moved up an down only in one axis and restricts it movement inside the slider area.

ColorSlider

An example script that changes the color of a material.

Voice

VoiceCommand

A simple script that allows the developer to type in a command and select a corresponding action.

VoiceClickOnInteractables

A simple scripts that invokes the Tapped event on the InteractableButton currently being targeted.

Head Gaze

HololensCursor

Simple script that displays a cursor on the object in front of the HoloLens.

HeadGazeButton

Button that can be clicked on by targeting it with the Head Gaze.

Eye Gaze

GazeCursor

GazeCursor allows a cursor to be displayed at the point the user is looking. This can be just a visible cursor or a HoverLight.

EyeGazeHighlighter

A script that toggles a gameobject on when the user looks at the target.