Forum Discussion
sh0v0r
13 years agoProtege
Correct Way To Detect The Hardware
I'm trying to make my game automatically switch to OVR mode when the Hardware is detected but I'm unsure as to how to do that correctly? I have tried doing this: if (OVRDevice.IsHMDPresent()) ...
sh0v0r
13 years agoProtege
Well on further inspection I realised the error of my ways, disabling the OVRCameraController disables the OVRDevice component.
So what I have done is created an 'Enabled' empty GameObject with just the OVRDevice Component and removed the OVRDevice Component from the 'Disabled' OVRCameraController.
Then in Start() I do this:
I tested this works by pulling the USB cable out and restarting it and vice versa.
So what I have done is created an 'Enabled' empty GameObject with just the OVRDevice Component and removed the OVRDevice Component from the 'Disabled' OVRCameraController.
Then in Start() I do this:
if (OVRDevice.SensorCount > 0)
{
normalCamera.SetActive(false);
riftCamera.SetActive(true); // OVRCameraController
}
I tested this works by pulling the USB cable out and restarting it and vice versa.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 2 years agoAnonymous