Skip to content
Zach Kinstner edited this page Nov 2, 2016 · 3 revisions

The HoverKit prefab contains components that provide manager, settings, and cursor components that are used to power Hover UI Kit within a Unity scene. Placing this prefab into your scene is the first step toward using Hover UI Kit in your app or project.

The following sections describe the purpose and configurable properties of each component.

Root Level

This section describes components that are attached at the root level of the prefab (the HoverKit object).

Items Manager

The HoverItemsManager component is responsible for maintaining a list of all the items in your scene. It finds an initial list of items at startup, and then tracks items as they are added or removed during runtime. It provides methods for querying the item list in various ways.

This component triggers events when the item list is first initialized, when an item is added at runtime, and when an item is removed at runtime.

Raycast Manager

The HoverItemsRaycastManager component is responsible for calculating the best/nearest results for each raycast-enabled cursor. Unlike standard cursors, raycast-enabled cursors can have both "origin" and "hit" positions, where the "hit" position is the best/nearest intersection between the ray and a particular item.

Highlight Manager

The HoverItemsHighlightManager component is responsible for comparing the highlight states of all items in the scene. It updates items and cursors using this scene-wide information (for example: telling an item that it is the closest to a cursor, compared to all other items).

Sticky Manager

The HoverItemsStickyManager component is responsible for watching the "sticky-selection" states of all items in the scene. It updates cursors using this scene-wide information (for example: telling a cursor which "sticky-selection(s)" it is currently controlling).

Radio Manager

The HoverItemsRadioManager component ensures that no more than one radio item is selected within each radio group.

Cursor Level

This section describes cursor-related components that are attached below the root level of the prefab (the HoverKit/Cursors object and its children).

Cursor Data Provider

The HoverCursorDataProvider component is responsible for maintaining a list of all the cursors. It serves as a shared interface for all other components to obtain cursors (and their data).

This component provides methods for obtaining cursors by cursor type. It also provides methods, which are typically used by input modules, to report whether each particular cursor is available.

Cursor Objects

Individual cursors are child objects of the HoverKit/Cursors object, such as:

  • HoverKit/Cursors/LeftHand/LeftIndex
  • HoverKit/Cursors/RightHand/RightThumb
  • HoverKit/Cursors/Look

For more detailed discussion, please see the cursor documentation.

Note that each cursor object contains a sphere mesh, which can be made visible by enabling the cursor's MeshRenderer component. This can be helpful for debugging. It also allows you to select a cursor object by clicking its sphere in the Unity "scene" view (rather than selecting it via the Unity inspector).

Clone this wiki locally