UI Input ModuleΒΆ

The UI Input module allows you to use hands to control standard Unity UI widgets.

https://di4564baj7skl.cloudfront.net/documentation/images/unity/UIInput_Example2.jpg

The primary component of the UIInput module is the LeapEventSystem prefab. The LeapInputModule script component of this prefab implements a Unity InputModule that uses tracking data to allow the user to manipulate standatd UI controls with their hands. The UIInput module also provides prefabs for the main Unity UI widget types. These prefabs use the CompressibleUI script, which animates the controls when the user manipulates them, as well as drop shadows. You can use the standard Unity widgets as is, however.

The UIInput module uses the tracking data from the scene’s LeapServiceProvider directly and doesn’t rely on graphical or physics hands in the scene. The system projects a cursor through the user’s first knuckle and generates pointer events in the Unity event system.

The exception to this is the PhysicsButton prefab and its PhysicsUI script. The PhysicsButton uses rigidbody collisions to depress the button and so requires physics hands. The PhysicsButton does not require the LeapInputModule.

See also: New Unity Module for User Interface Input.