WaveVR EventSystem¶
Older versions (3.0.x and before) can be found here: WaveVR EventSystem
Introduction¶
Unity provides the Event System to send events to objects in the application based on input, be it keyboard, mouse, touch, or custom input.
In this document, we will introduce how to use the VIVE Wave™ Event System.
For more information of the VIVE Wave™ Event System components, you can refer to the documents below:
- Controller Input: Refer to WaveVR_ControllerInputModule
- Gaze Input: Refer to WaveVR_GazeInputModule
- Input Manager: Refer to Input Module Manager
- Event Handler: Refer to Customized Event Handler
Practice¶
Considering you already have a scene with the components below:
- A 3D cube
- A UGUI button
- A UGUI dropdown menu
The scene looks like the photo below:

The project hierarchy looks like the photo below:

For using the VIVE Wave™ Event System, follow the steps below:
Drag the prefab Assets/WaveVR/Prefabs/WaveVR into the scene like the photo below. This prefab is the basic component of VIVE Wave™ SDK.
Drag the prefab Assets/WaveVR/Prefabs/InputModuleManager into the scene like the photo below. This prefab will manage the input module in runtime.
Drag the prefab Assets/WaveVR/Prefabs/ControllerLoader into the scene like the photo below. This prefab will load the controller model in runtime.
Drag the prefab Assets/WaveVR/Prefabs/WaveVRButtons into the scene like the photo below. This prefab will handle the button events in runtime.
Add the component WaveVR_EventHandler to the cube like the photo below. This script is located in Assets/WaveVR/Extra/EventSystem/
After all steps are done, you can play the scene in editor mode and follow the operations below to interact with the scene:
- Hold the Right Alt key and move the mouse to move the controller model.
- Hold the Left Alt key and move the mouse to change the head rotation.
- Right-click on the mouse to send a click event to the cube, button and dropdown menu.
- Hold the right mouse button to drag the cube.
Customized Event Handler¶
To handle the events , you will have to write your own Event Handler. VIVE Wave™ SDK provides a sample script WaveVR_EventHandler in Assets/WaveVR/Extra/EventSystem. You can simply copy the script and overwrite the APIs inside the region #region override event handling function.
#region override event handling function
public void OnPointerEnter (PointerEventData eventData)
public void OnPointerExit (PointerEventData eventData)
public void OnPointerDown (PointerEventData eventData)
public void OnBeginDrag(PointerEventData eventData)
public void OnDrag(PointerEventData eventData)
public void OnEndDrag(PointerEventData eventData)
public void OnDrop(PointerEventData eventData)
public void OnPointerHover (PointerEventData eventData)