← 返回首页
Example 0.Tutorial · ViveSoftware/ViveInputUtility-Unity Wiki · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Example 0.Tutorial

Lawrence Wong edited this page Aug 25, 2017 · 8 revisions

This example shows how to build up the basic environment that can interact with Unity built-in UI component.

  • After opening a new scene, remove default Main Camera and add the ViveCameraRig prefab to setup a basic VR scene. This prefab simply include VR devices like HMD(Camera), controllers and trackers.

  • Add VivePointers prefab into the scene. This prefab contains 2 event raycasters that can interact with the UI elements.

  • Create an UI button in hierarchy.

  • Remove default event system object (Optional).
  • Select default canvas object.
  • Remove canvas scalar component (Optional).
  • Remove graphic raycaster component (Optional).
  • Set render mode to "World Space".

  • Click "Add Component" to add the CanvasRaycastTarget script.

  • Set rect transform on canvas and button to locate them into your VR camera's sight.

  • UGUI now catches events from your Vive controllers!
  • You can find the complete scene in Asset/HTC.UnityPlugin/ViveInputUtility/Examples/0.Tutorial

Wiki pages Pages 20

Clone this wiki locally

Footer

© 2026 GitHub, Inc.