The Unity Sample Framework provides sample scenes for developers for common VR-specific features such as hand presence with Oculus Touch, locomotion, custom hands, and the Oculus Guardian System. With the Sample Framework, developers can examine the sample scenes, see how features were implemented, and potentially use the content themselves.
Content in the Sample Framework has been designed so that developers can easily use it in their own existing projects. To encourage developers to use the content in the Sample Framework, it uses a very permissive license. For more information, see
Download the Oculus Integration to access the Sample Framework, or search for Oculus Unity Integration in the Asset Store tab of the Unity Editor.
The Sample Framework is a part of the Oculus Integration for Unity and can be found by searching for the Oculus Integration in the Asset Store tab of the Unity Editor. The Oculus Integration for Unity includes scripts, prefabs, and other resources to supplement Unity’s built-in support for VR development. The concepts, Game Objects, prefabs, and scripts used in the Sample Framework can be used in conjunction with the Oculus Integration for development of your own applications.
To import the Oculus Integration in Unity Editor:
OVRPlugin. It is recommended that you use the latest version. If there is an update and you install it, the Unity Editor will restart.
Sample Framework scenes have been designed so that each one illustrates a basic concept important to Oculus and VR development. To keep things as simple as possible, the sample scenes require no configuration beforehand, and can be played right after importing the framework and opening them.
Here are the steps for running Sample Framework scenes:
The sample scene should begin playing. For details on the scenes, look at the descriptions in the following table and explore the scene topics where available. After you’ve run a sample scene, feel free to experiment with the objects, components, and scripts that make up the scene.
The Sample Framework 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 in the
\Core\ folders under
\Assets\Oculus\SampleFramework\. The content is divided between them as follows:
\Core\ folder contains subfolders for each scene with content key to the scene’s core functionality. This content has been designed so developers can easily use them directly in their own existing projects.
\Usage\ folder contains content that developers are not likely to want to use. This content generally has nothing directly to do with the interesting or prominent parts of the sample. They just demonstrate how to use the sample code in a working scene.
After the Oculus Integration has been imported, the sample scenes can be found in
\Assets\Oculus\SampleFramework\Usage. The samples are listed in the following table.
|AvatarGrab||Demonstrates the use of Avatar hands to grab and manipulate predefined objects.|
|Locomotion||Provides a framework for moving an Avatar through an environment with support for linear movement, teleports and related input, and visual effects.|
|OVROverlay||Demonstrates how creating a UI with a |
|CustomHands||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.|
|DistanceGrab||Demonstrates the use of custom hands to grab and manipulate objects at a distance by having them zoom toward your hand.|
|GuardianBoundarySystem||Illustrates use of |
|CustomControllers||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.|
|DebugUI||An isolated example of the debug UI used in other sample scenes. By adding the |
|MixedRealityCapture||A scene with mixed reality capture enabled.|
|StartScene||Used when building to create a menu from which to select one of these sample scenes.|
|Stereo180Video||Demonstrates video playback for Oculus Go and Gear VR.|