The following examples set the
CameraRig for SteamVR and Oculus Rift respectively:
Finds the default SteamVR CameraRig and configures the HMDSimulator to use it.Finds the default Oculus Rift Utilities for Unity camera rig and sets it as the HMDSimulator's CameraRig.
GameObject cameraRigGameObject = GameObject.Find("[CameraRig]");
Transform cameraRigTransform = cameraRigGameObject.transform;
HMDSimulator.setCameraRig(cameraRigTransform);
GameObject oculusRiftCameraRig = GameObject.Find("OVRCameraRig");
Transform cameraRigTransform = oculusRiftCameraRig.transform;
HMDSimulator.setCameraRig(cameraRigTransform);