VR
info
You can import this example in the Package Manager window
Managing Samples
danger
To use this sample you must first add OpenXR plugin to your project
OpenXR Plugin Site
danger
This sample only supports avatars specifically made for VR, not the ones generated by users. This is a WIP
In this example we will use the SDK UI to create and load avatars.
First, open the VR Sample scene. You can find it in:
VR w/ User Interface → Scenes
Requirements
Add two new layers: "Avatar” and "VRHead"
To do this go to the Inspector -> Layer -> Add Layer
Then add the name “Avatar” to an empty field. Do the same for "VRHead"
Unity Documnentation: Layers
The VR Avatar Loader
Variable | Description |
---|---|
PlayerAnimator | The animator controller for the avatar. (Don't change this if you want hand animations) |
Use VR Hands | If false, it will hide avatar's hand by default. Use this if you want to use custom hand models |
Use Hands Canimations | Requires "Use VR Hands". If true, the hands will match the controller hand gestures |
Head Transform | Transform of the HMD to contraint the avatar's head |
Right Hand Transform | Transform of the right controller to contraint the avatar's hand |
Left Hand Transform | Transform of the left controller to contraint the avatar's hand |
Offsets | Use this to tweak the final position/rotation offsets of the constraints |