Skip to main content
Participant
November 7, 2014

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 !
    This topic has been closed for replies.

    6 replies

    Inspiring
    November 7, 2014
    Can I ask what purpose you need to detect the "DirectToRift" option?
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    korinVR
    Honored Contributor
    November 7, 2014
    To check if Oculus Rift is connected, probably you can use OVRManager.display.isPresent.
    Katsuomi Kobayashi ( @korinVR ) at FrameSynthesis Inc.
    Inspiring
    November 8, 2014
    Are you looking for OVRManager.display.isDirectMode? If you really need to know which executable was run you could use Environment.GetCommandLineArgs()[0].
    mostertagAuthor
    Participant
    November 9, 2014
    Thank you everyone, OVRManager.display.isPresent is what I am looking for.
    Unfortunately, it seems that there's no OVRManager.display.isDirectMode...
    mostertagAuthor
    Participant
    November 12, 2014
    Is it possible to detect if the Direct Mode is active ?
    Inspiring
    November 12, 2014
    I can see that there is a public property:

    OVRManager.display.isDirectMode


    Maybe you don't have the latest SDK?
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV