Skip to main content
Inspiring
June 9, 2015

Unity 5.1 first-party VR support

Unity version 5.1 adds first-party VR support that enables a stereoscopic VR camera for the Oculus Rift with the simple selection of a "Virtual Reality Supported" checkbox in Player Settings. We are extremely excited by this big step!

Over the next few weeks, this feature will be expanded to provide first-party VR support for the Samsung Gear VR as well as the Oculus Rift. Oculus will also provide an updated version of the Unity integration to allow legacy VR projects to work seamlessly with new Unity's VR support.

For now, developers are free to upgrade Unity to version 5.1. If you have a project that already uses our Unity integrations (v 0.6.0 or earlier), leave Unity first-party support deselected, and continue to develop as before. Stay tuned for developments!
    This topic has been closed for replies.

    29 replies

    New Participant
    June 15, 2015
    Hope it's OK to piggy-back off this post... didn't want to create a new post on a very similar topic.

    Any chance somebody has done a step-by-step tutorial of setting up an FPS with 5.1, sort of like this https://www.youtube.com/watch?v=dcO-9scGvJs? (I could do without the whole middle part about creating a simple room and applying materials.)

    I just got hold of an Oculus Rift DK2 for the first time. It wasn't quite plug-and-play, although not too far off. I was able to use some demos right away--RiftCoaster, Air Drift, A Chari in a Room--but had a harder time with Unity.

    First attempt:
    - Unity 5.0.1
    - Oculus runtime 0.6.0.0
    - OculusUnityIntegration.unitypackage using the OVRPlayerController
    Somewhat successful in that I finally got it running both in Unity and as a build. As a build, I was seeing double / blurred.

    Second attempt:
    - Unity 5.1.0f
    - Oculus runtime 0.6.0.0
    - Unity's Standard Assets FPSController
    Not successful. Crashed all the time and / or couldn't get it to show up.

    Third attempt:
    - Unity 5.1.0p1
    - Oculus runtime 0.6.0.0
    - Unity's Standard Assets FPSController (I just saw that 5.1.0p1 also has a UnityStandardAssets download. Do I need that separately or when I installed the patch did it also install the updated Standard Assets?)
    Not successful. Crashed and / or didn't show up.

    I"ve read about the direct to the Rift mode vs extended screen mode and tried both, certainly checked the us VR mode in the Player settings. But as a new-comer to both Unity and the Oculus, I'm just starting to wrap my head around it and I have to start from the beginning and build from there. If anybody knows of or creates a step-by-step tutorial, I would be so appreciative.
    Inspiring
    June 15, 2015
    Does it work inside the Unity editor and have you tried building an exe file?

    Can you share some log files from the crash?
    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
    Inspiring
    June 15, 2015
    Also, can you click "Help -> Report a Bug" and then send me the bug ID you receive? Thanks.
    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
    New Participant
    June 16, 2015
    Hi,

    Is the OVR HMD Debug mode supported on Unity? My system just displays mono without
    the rift hardware. Will it be ?

    Also, I think that access to the different layer types would be desirable so that
    we can render without distortion, etc.

    Thanks!
    Inspiring
    June 16, 2015
    It seems Unity only switches into VR mode if the headset is detected.

    Can you explain what you are trying to do with layers? I'm unsure how rendering without distortion would be useful.
    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
    New Participant
    June 16, 2015
    Thanks. It would be nice to expose the debug device also.

    Using layers it is possible to have different update rates or resolution for elements. You could even do
    some crazy things like degrading illumination to keep a high FPS, for example. I think that was the original
    idea of having layers in the first place, right ?

    If you are tracing rays (raycast/raytracing) you could do the distortion in one pass instead
    of rendering flat and then correcting for distortion (if you bring back with the ability of reading the distortion
    mesh to the API please). One example is volumetric rendering.
    Participant
    July 14, 2015
    I am using a dk1 and I just tried switching over to first party support. Everything seems to be working except I do not see the barrel distortion/stereoscopics. Am I missing something?

    Thanks
    Inspiring
    July 14, 2015
    Does head-tracking function at all? Are you in Direct Mode?

    The editor will remain in 2D, but you should see a 3D image on the Rift.
    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
    Participant
    July 14, 2015
    Head tracking works no problem, the image loads into the Rift but remains non stereoscopic. :\ I am in extended mode currently. Im lost, any ideas anyone?

    Does this have to do with Oculus not supporting nVidia graphics cards pre 600 series? If so, what is my best option?

    Thanks
    Inspiring
    July 14, 2015
    Can you try Direct Mode?
    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