Forum Discussion
JamieSinn
13 years agoHonored Guest
Oculus Detection?
Is there a way in the Unity SDK to detect if there is an oculus attached?
I want to make it optional for use of the oculus, and I haven't seen a way to detect if it is connected so far.
Thanks :D
I want to make it optional for use of the oculus, and I haven't seen a way to detect if it is connected so far.
Thanks :D
4 Replies
Replies have been turned off for this discussion
- KrisperExplorerI just use something like this:-
if(OVRDevice.SensorCount > 0) {
riftFound = true;
} - boone188Honored GuestYou can use the OVRMessenger, like it is done in the OVRMainMenu:
OVRMessenger.AddListener<Device, bool>("Sensor_Attached", UpdateDeviceDetectionMsgCallback);
So you add a callback function that will get called when a device is either attached or detached. - sh0v0rProtegeI asked the same question a while ago Krispers answer is what I came up with.
viewtopic.php?f=37&t=1648
I check this on startup to auto switch the games mode but you might want to provided a confirmation option which I eventually plan to do. - KrisperExplorer
"sh0v0r" wrote:
I asked the same question a while ago Krispers answer is what I came up with.
viewtopic.php?f=37&t=1648
I check this on startup to auto switch the games mode but you might want to provided a confirmation option which I eventually plan to do.
Sorry, it was from your original post that I copied the code. Couldn't remember where it came from :oops:
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
- 10 years ago
- 3 years ago
- 12 months agoAnonymous