Unity StarterSamples
Updated: Oct 28, 2024
The Unity Starter Samples project provides sample scenes for developers for common VR-specific features such as hand presence with controllers, locomotion, and custom hands. With the Starter Samples, you can study sample scenes in the Unity Editor, see how features are implemented, and integrate the framework in your own projects. This project is available for download from the
Starter Samples Github repository.
To encourage the usage of the content, it uses a very permissive license. For more information, see
LICENSE in the root of the project.
Oculus Integration SDK Release Deprecation
The Oculus Integration SDK releases have been deprecated after version 57. To see instructions for the Sample Framework Scenes that are part of the Oculus Integration SDK, see Unity Sample Framework.Getting the Starter Samples project
Clone this repo using the Code button on the Github repo, or run this command:
git clone https://github.com/oculus-samples/Unity-StarterSamples.git
How to run the project in Unity
- Make sure you’re using Unity 2021.3.26f1 or newer.
- In the Unity Hub > Project, click Add to add the project from disk.
- Click to open the project in Unity.
- Find the sample scenes in
Assets/StarterSamples/Usage
. - Double click on individual scenes to open them.
- Click the Play button to explore scene functionality in Unity.
- Navigate to Meta > Samples > Build Starter Scene to build an APK that will launch the Starter Scene.
- In this apk you will be able to cycle through the different sample scenes to test them out on device.
- Navigate to the
Unity-StarterSamples
folder and copy the StartScene.apk
to your device using Meta Quest Developer Hub.
After setting up your project for URP, use the Window > Rendering > Render Pipeline Converter material upgrade to automatically change all materials using the Standard shader to using the URP equivalent. All materials that have custom shaders have been modified to ensure that they support both the Built-in Render Pipeline and the Universal Render Pipeline.
Integrate samples to your own project
There are two ways to integrate the samples a project that uses the same Unity version.
Move the samples to your project Copy the Assets > StarterSamples directory to your own project
Create UnityPackage to import - Open
Unity-StarterSamples
project in Unity. - Navigate to the Assets folder.
- Right-click on
StarterSamples
and select Export Package.... - Save package in an easy location to retrieve.
- Open your own project.
- Click on Assets > Import Package > Custom Package... from the menu bar.
- Find the package we saved in step 3 and click Open.
Content and Sample Scenes
The Starter Samples features reusable components that developers can use in their own existing projects and sample scenes that demonstrate the usage of these components.
Content used in the scenes can be found at Assets > StarterSamples > Usage.
The Starter Sample scenes are listed in the following table.
Scene | Concept Illustrated |
---|
| Demonstrates custom controller models and interactive animations. While discouraged for use in gameplay, developers may want to use controllers in some specific cases, such as tutorials or demos. |
| Demonstrates the use of custom hand models. Developers can use this as a starting point for their own hands by building on the existing models and animations. |
| Demonstrates how you can implement hand tracking to use hands to interact with objects in the physics system using a train example. |
| Demonstrates various movement schemes as examples of how you can implement locomotion in your own applications |
| Demonstrates how creating a UI with a OVROverlay compositor layer improves image quality and text clarity in comparison to an application layer UI. |
| Demonstrates how you can create a UI that renders a canvas as an overlay in your application. |
| Demonstrates how you can create a UI canvas that displays text on an overlay canvas in your application. |
| A collection of eight samples that showcase augmented objects, lighting, overlay passthrough, hands, styles, selective passthrough, and surface project passthrough. |
| Demonstrates the most important features and concepts in a single scene. |
| Demonstrates the capabilities including handling and maintaining Spatial Anchors. |
| Shows a simple scene selection menu containing other scenes from the Unity Sample Framework. |
| Demonstrates how to play a stereo 180-degree video. |
| Demonstrates the use of WidevineVideo in your applications. |