Unity VR Samples
More actions
| Unity VR Samples | |
|---|---|
| Information | |
| Developer | Unity Technologies |
| Platform | Oculus Rift (Platform) |
| Device | DK2, Samsung Gear VR (original targets) |
| Operating System | Windows, Android |
| Type | Experience |
| Genre | Casual, Shooter, Puzzle, Action/Adventure |
| Input Device | Keyboard, Mouse |
| Game Mode | Single Player |
| Release Date | 9 December 2015 |
| App Store | Unity Asset Store (legacy project) |
| Website | http://u3d.as/mHh |
Unity VR Samples is a sample VR application and development project from Unity Technologies that demonstrates virtual reality interaction through mini-games, a menu and reusable, commented scripts. Will Goldstone announced its availability on 9 December 2015, crediting collaboration with Iestyn Lloyd, who also wrote accompanying learning articles. The original supported devices were the Oculus Rift DK2 and consumer Samsung Gear VR, including the Samsung Galaxy S6 and Note5 phones.[1]
The package is now listed as VR Samples [LEGACY]. As of October 2026, its Asset Store page marks it deprecated, unavailable for purchase and no longer supported by its publisher. The notice says existing owners retain access through their My Assets list.[2]
Features
The project combines a playable sample application with code that developers can inspect and reuse. Its original interaction model uses head-directed gaze aiming and button input. In 2017, Oculus published a separate tutorial for adapting the menu and four mini-games to the Gear VR Controller, adding a controller-directed laser pointer and changing the flight and shooting controls.[3]
Sample scenes
| Scene | Purpose |
|---|---|
| Intro | Introduces the look-and-hold selection interaction and lets the user practice selecting a target.[4] |
| MainMenu | Provides the menu used to select the sample games.[3] |
| Flyer | Demonstrates steering a spacecraft with head orientation in its original control scheme.[3] |
| Maze | Demonstrates setting a character's destination on the maze. Its target-setting script uses the reticle position when a double-click event occurs.[5] |
| Target Gallery (Shooter180) | A shooting example whose gun follows the user's head orientation in the original implementation.[3] |
| Target Arena (Shooter360) | A second shooting scene that reuses the gallery controller and gun scripts.[3] |
Reusable interaction components
The scripts separate detecting a target, handling input and responding to an interaction:
| Component | Role |
|---|---|
VREyeRaycaster |
Casts a ray forward from the camera, checks the hit object's collider for a VRInteractiveItem, forwards button events to that item and updates the reticle.[6]
|
VRInteractiveItem |
Gives scene objects events for gaze entering or leaving, clicking, double-clicking, and pressing or releasing the input button.[7] |
VRInput |
Exposes click, double-click, press, release, cancel and directional swipe events. The original code also provides keyboard emulation of swipes.[8] |
Reticle |
Displays an aiming marker at the ray's hit point or a default distance, adjusting its scale with distance.[9] |
SelectionRadial |
Fills a circular progress indicator while the Fire1 input is held and sends a selection-complete event when its timer finishes.[10] |
Here, gaze is calculated from the camera's forward direction.[6]
Historical requirements and setup
The launch announcement identified DK2 and consumer Gear VR as the initial targets.[1] A September 2016 development article used the package's scripts with Unity 5.3 and Android build tools for Gear VR. Its workflow created a separate project for the samples and imported selected interaction scripts into another application. It also noted that running scenes outside the included sample application required additional configuration.[11]
The later Oculus controller tutorial used Unity 5.6.2f1 and Oculus Utilities for Unity 5. For its Gear VR Android build, it documented enabling Virtual Reality Supported, selecting Oculus support and adding a device-specific Oculus Signature File to the project. These instructions describe the 2017 toolchain and the modified controller example.[3] The original package's current listing identifies it as unsupported legacy software.[2]
Reuse in other applications
A 2016 development article used the package's interaction scripts to build a separate business application, with avatars representing travelers and gaze selection opening their details.[11]
A paper presented at the 2020 IEEE Aerospace Conference described reusing the sample pack's gaze-selection code in a VR system for inspecting aircraft-engine models and performance plots. The researchers combined this estimated, central-view gaze direction with Leap Motion hand tracking. Their evaluation was an exploratory study with three expert participants using the combined application.[12]
References
- ↑ 1.0 1.1 Will Goldstone (2015-12-09). "Unity VR Samples now available". Unity Discussions. https://discussions.unity.com/t/unity-vr-samples-now-available/608210. Retrieved 2026-10-18.
- ↑ 2.0 2.1 "VR Samples [LEGACY"]. Unity Asset Store. https://assetstore.unity.com/packages/essentials/tutorial-projects/vr-samples-legacy-51519. Retrieved 2026-10-18.
- ↑ 3.0 3.1 3.2 3.3 3.4 3.5 Gabor Szauer (2017-08-08). "Adding Gear VR Controller Support to the Unity VR Samples". Oculus Developer Blog. https://developers.meta.com/vr/blog/adding-gear-vr-controller-support-to-the-unity-vr-samples/. Retrieved 2026-10-18.
- ↑ "VR Samples: IntroInstructions.prefab, 9 December 2015 snapshot". Unity VR Samples source preserved in the OSVR repository. https://raw.githubusercontent.com/OSVR/Unity-VR-Samples/2503a23f8478d5ad9fb16637e8c372749bf7175c/Assets/VRSampleScenes/Prefabs/Intro/IntroInstructions.prefab. Retrieved 2026-10-18.
- ↑ "VR Samples: MazeTargetSetting.cs, 9 December 2015 snapshot". Unity VR Samples source preserved in the OSVR repository. https://raw.githubusercontent.com/OSVR/Unity-VR-Samples/2503a23f8478d5ad9fb16637e8c372749bf7175c/Assets/VRSampleScenes/Scripts/Maze/MazeTargetSetting.cs. Retrieved 2026-10-18.
- ↑ 6.0 6.1 "VR Samples: VREyeRaycaster.cs, 9 December 2015 snapshot". Unity VR Samples source preserved in the OSVR repository. https://raw.githubusercontent.com/OSVR/Unity-VR-Samples/2503a23f8478d5ad9fb16637e8c372749bf7175c/Assets/VRStandardAssets/Scripts/VREyeRaycaster.cs. Retrieved 2026-10-18.
- ↑ "VR Samples: VRInteractiveItem.cs, 9 December 2015 snapshot". Unity VR Samples source preserved in the OSVR repository. https://raw.githubusercontent.com/OSVR/Unity-VR-Samples/2503a23f8478d5ad9fb16637e8c372749bf7175c/Assets/VRStandardAssets/Scripts/VRInteractiveItem.cs. Retrieved 2026-10-18.
- ↑ "VR Samples: VRInput.cs, 9 December 2015 snapshot". Unity VR Samples source preserved in the OSVR repository. https://raw.githubusercontent.com/OSVR/Unity-VR-Samples/2503a23f8478d5ad9fb16637e8c372749bf7175c/Assets/VRStandardAssets/Scripts/VRInput.cs. Retrieved 2026-10-18.
- ↑ "VR Samples: Reticle.cs, 9 December 2015 snapshot". Unity VR Samples source preserved in the OSVR repository. https://raw.githubusercontent.com/OSVR/Unity-VR-Samples/2503a23f8478d5ad9fb16637e8c372749bf7175c/Assets/VRSampleScenes/Scripts/Utils/Reticle.cs. Retrieved 2026-10-18.
- ↑ "VR Samples: SelectionRadial.cs, 9 December 2015 snapshot". Unity VR Samples source preserved in the OSVR repository. https://raw.githubusercontent.com/OSVR/Unity-VR-Samples/2503a23f8478d5ad9fb16637e8c372749bf7175c/Assets/VRSampleScenes/Scripts/Utils/SelectionRadial.cs. Retrieved 2026-10-18.
- ↑ 11.0 11.1 Tim Kulp (2016-09). "Unity: Building Virtual Reality Applications". MSDN Magazine, volume 31, number 9. https://learn.microsoft.com/en-us/archive/msdn-magazine/2016/september/unity-building-virtual-reality-applications. Retrieved 2026-10-18.
- ↑ Sławomir Konrad Tadeja; Yupu Lu; Pranay Seshadri; Per Ola Kristensson (2020). "Digital Twin Assessments in Virtual Reality: An Explorational Study with Aeroengines". 2020 IEEE Aerospace Conference, accepted manuscript. https://api.repository.cam.ac.uk/server/api/core/bitstreams/5a4ce348-66cd-4ac4-8191-9e8e93930afc/content. Retrieved 2026-10-18.