Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
mostertag's avatar
mostertag
Honored Guest
12 years ago

Unity - Oculus DK2 Detection

Hello everyone,

I am working with Unity 4.3.2f1 and the Oculus 0.4.3 lib. After building my standalone project I have two .exe (Normal and DirectToRift).
I would like to know if it's possible to know which version was launched ? How can I detect that ?

Thank you !

6 Replies

Replies have been turned off for this discussion
  • Can I ask what purpose you need to detect the "DirectToRift" option?
  • korinVR's avatar
    korinVR
    Expert Protege
    To check if Oculus Rift is connected, probably you can use OVRManager.display.isPresent.
  • Are you looking for OVRManager.display.isDirectMode? If you really need to know which executable was run you could use Environment.GetCommandLineArgs()[0].
  • Thank you everyone, OVRManager.display.isPresent is what I am looking for.
    Unfortunately, it seems that there's no OVRManager.display.isDirectMode...
  • I can see that there is a public property:

    OVRManager.display.isDirectMode


    Maybe you don't have the latest SDK?