Skip to content

XRUserRootConfig

Ryan Goodrich edited this page Jul 31, 2018 · 1 revision

XRUserRootConfig

Contains references to all the necessary prefabs and datums required to construct an XRUser in the game world for a particular headset and platform. You will have one XRUserRootConfig for each XR platform.

The Library comes with a selection of pre-configured XRUserRootConfig's located in the Datums/UserConfigs directory for the Vive, Oculus and Windows MR headsets, through both their native SDK and the OpenVR SDK. The preconfigured XRUserRootConfig's come in two categories, 'Standard' and 'Grab'. The 'Standard' configs contain the ability to interact with objects via a laser, via grabbing, the ability to teleport, and interact with Unity UI. The 'Grab' configs contain all the same functionality except for the ability to interact with object via a laser.

An XRUserRootConfig must have the following prefabs and datums configured on it.

Property Description
Device Name The name of the Headset as returned by XRSettings.loadedDeviceName.
Left User Controller Prefab The XRUserController which is to provide functionality for the left hand.
Left Controller Model Prefab The visible XRControllerModel model to used for the left controller.
Left Controller Input Map The XRInputMap which defines how the left controllers inputs will be routed to a unified set of input abstractions.
Right User Controller Prefab The XRUserController which is to provide functionality for the right hand.
Right Controller Model Prefab The visible XRControllerModel to used for the right controller.
Right Controller Input Map The XRInputMap which defines how the right controllers inputs will be routed to a unified set of input abstractions.
Haptic Engine Prefab which implements necessary functionality to interface with a platforms haptics.
Haptic Map Specifics a XRHapticMap which defines a list of haptic 'keys' and there corresponding configuration so you can fire haptics via keys.

Prefabs and Datums can be reused in the same XRUserRootConfig and across different XRUserRootConfig datums. For example, the config for the Vive shares the same XRControllerModel prefab for both hands, all of them share the same XRHapticMap.

An XRUserRootConfig is loaded into an XRUserRoot in order to have it's configuration loaded into the environment.

Clone this wiki locally