Using Unity to Develop VR Experiences
View Lesson Here
- Enable VR in the Unity Editor
- Obtain the Oculus Integration tools in VRTK
- Tips for developing VR projects in Unity
Goals:
- Install Oculus Integration and VRTK in Unity
- Enable VR in a Unity Project
- Explore VR SDK use cases
- Set up a basic scene using Oculus Utilities and VRTK
Oculus Integration:
- Scripts
- Prefabs
- Other resources
- Interface for controlling VR camera behaviour
- First-person controller prefab
- Object-grabbing and Haptics scripts for Touch
Oculus Integration is available on the Unity Asset Store
Learn more about the Virtual Reality Toolkit here
Creating a Unity Project
Unity 2018.4 LTS is recommended for VR
- Make a new 3D project in Unity
- Go to the Asset Store and search for oculus
- Download the Oculus Integration
- Restart Unity and upgrade
Import VRTK
- Go to the VRTK packages site on GitHub
- Clone to your assets folder in Unity
- Follow the instructions the the VRTK site to implement into Unity
- Return to unity and let it load
VRTK Oculus Integration
Same as before, clone the Oculus Integration repo into the assets folder.
Unity Player Settings
To enable VR settings within Unity do the following steps:
- Go to Project Settings
- Select Player
- Under XR Settings tick “Virtual Reality Supported”
After checking the checkbox a list of SDKs will appear. Oculus is automatically added.
Shared Depth Buffer
- Any OVROverlay layer will render in the scene at a defined depth
- If other objects in the scene are “closer” they may render on top of the OVROverlay layer
If Your Application Supports Dash
When it pauses the Dash menu will be drawn over your paused application. Otherwise it will be paused by the runtime and the user will be presented with a Dash menu in an empty room.
More info can be found at the Oculus Developer Page.
Remember to follow along and build your own vertical slice! You can access additional support and submit your vertical slice to the Oculus Developer Support team for feedback: Unity: Learn VR
Next Lesson: Locomotion and Ergonomics