Search Unity

Unity 5.4.0 Not Working with Oculus DK2

Discussion in 'AR/VR (XR) Discussion' started by remistorms, Aug 9, 2016.

  1. remistorms

    remistorms

    Joined:
    Jul 13, 2012
    Posts:
    7
    Hello,

    I have an oculus dev kit 2 and it worked like a charm in unity 5.3. Pretty simple setup, basically plug it, check the VR supported and worked with any camera you had on the scene.

    Im using oculus runtime Version 1.10 (SDK 0.8.0.0).

    However, when I installed Unity 5.4.0f3 and tried to make a VR Project the Camera Doesnt track the oculus motion, the oculus display stays black and basically nothing works.

    I couldn't find any solution online or in the documentation. Is anyone else having the same issue?

    Im running everything on Windows 7, graphichs card GeForce GTX 970.

    Thanks.
     
  2. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    Are you getting any warnings or errors in the console window when you try to run? Also, make sure that you accept the Health and safety warning in your HMD before you enter play mode.
     
  3. hellcaller

    hellcaller

    Joined:
    May 19, 2010
    Posts:
    381
    are your Oculus Utilities for Unity up to date?
     
  4. rensutheart

    rensutheart

    Joined:
    Jan 28, 2016
    Posts:
    2
    I had the same problem. I was developing for GearVR, and the VR on the Android device seemed to work fine. However, when I tried to test the app in the editor, the Oculus Rift (DK2) would not be used.

    What I did to fix it: go into player settings, choose the tab for PC, Mac & Linux, there you also need to tick Virtual Reality Supported. Then under Virtual Reality SDKs add both Oculus and OpenVR. (For OpenVR, according to this, you might have to setup SteamVR first, which I already had set up). The DK2 should now work in play mode.

    Hope this works!
     
  5. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    You shouldn't need to use Open VR. I tested this again today just to confirm that things are working.
    Steps to easily get this working:
    Connect your DK2 to your machine.
    Put on the headset and accept the Health and Safety message.
    Start the Unity Editor. Enable VR supported in the player settings.
    Make sure Oculus is in the drop down. (It can be the only one)
    Enter play mode, look into your DK2 and accept the Health and Safety message again.

    I was using the latest version of Oculus home as well. A message should appear on home to tell you apps run from Home won't work with the DK2. Unity will still work since it's not being run from Oculus Home.
     
  6. Peter-Bickhofe

    Peter-Bickhofe

    Joined:
    Aug 31, 2014
    Posts:
    8
    Nope. Since the update to 5.4.0.f3 the DK2 isn't detected anymore.
     
  7. EricJ13

    EricJ13

    Joined:
    Feb 28, 2009
    Posts:
    355
    I'm experiencing this issue too, but only with a project set to Android platform. I hook up my DK2, run the latest version of the Oculus desktop app, and run my project... no joy. But, if I switch to PC, Mac & Linux Standalone platform and do the same thing my DK2 works as expected. I had no issues using my DK2 on my Android platform project on Unity 5.3, using the current Oculus desktop app.

    EDIT: I did follow the upgrade directions found here: http://docs.unity3d.com/Manual/VRDevices-Oculus.html
     
    Last edited: Aug 19, 2016
  8. sxkx360

    sxkx360

    Joined:
    Aug 18, 2013
    Posts:
    7
    No luck either with 5.4.0.3f, tried to use the new 1.7 utilities also but no luck although managed to make a build but it wasn´t working that well, some performance hit was obvious.
     
  9. BadSeedProductions

    BadSeedProductions

    Joined:
    Dec 26, 2014
    Posts:
    144
    I'm using 5.4.0p3 and it's working with my DK2 when I test it. My problem is that none of the builds will work. They just freeze at the unity splash.
     
  10. MhSalim

    MhSalim

    Joined:
    Feb 11, 2015
    Posts:
    1
    I have the same problem with 5.4.0.3f. I also followed the steps that explained here ttps://developer3.oculus.com/downloads/game-engines/1.3.2/OVRPlugin_for_Unity_5/
     
  11. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Can confirm Unity3D 5.4.0f3 and 5.4.0p3 both don't work with Oculus DK2. At home I have Unity3D 5.4.0f1 which works fine.

    Could this be fixed? Every Unity3D version so far had VR flaws up to 5.4.0f1 which was fine and now it isn't working anymore. I have to check every single Unity release if all my VR templates are working or not. And when I don't get errors, I find out there are minor bugs ruining the switch to a newer version. This DK2 not working is one of them.

    What I did:
    - VR enabled, because it has a new name, it will disable the VR enabled from previous versions. ( pls tell me that next time, took me 20 minutes to find out this in 5.4.0f1 without any warning)
    - Oculus Runtime updated
    - Oculus .DLL files changed as this fixed it in earlier versions of Unity.
    - Restarted PC, enabled DK2 and store first before Unity start.

    This was my normal procedure to check if my DK2 was working in newer version. First time it fails now.
    Can't work professionally like this, please fix it a.s.a.p.

    Btw, every time a release candidate comes out and have bugs which are ruining my daily professional workflow and eat up my time finding the issue and find out I can't do anything about it, can I send an invoice of my wasted time? Because this is annoying time consuming problems I deal with every release.
     
  12. EricJ13

    EricJ13

    Joined:
    Feb 28, 2009
    Posts:
    355
    I'm interested to know if folks using the consumer version of the Oculus Rift are having this problem. I hope to be able to use my DK2 for a good while longer, would hate for it to turn into a brick any time soon.
     
    BadSeedProductions likes this.
  13. EricJ13

    EricJ13

    Joined:
    Feb 28, 2009
    Posts:
    355
    Also, has anyone filed a bug report?
     
  14. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384

    < Old post, not true, but led me to the solving =) >


    I might have found the issue.

    When I made a new project, the DK2 was working just fine. When I load an old project, the DK2 wasn't working.

    Both I open the projects in Unity3D 5.4.0f3 and in both projects when I create and camera, they have different options. I think it has to do with the old project.

    Check out this screenshot: Both same Unity3D version and both created a new camera and both they have different options.



    The bug is related to the fact that an old project camera creation has different options and because of this the DK2 isn't working. So camera created in old project has another option then a camera created in a fresh project created from the latest unity3d version.

    I have no clue how to fix this in my old project. As when I create every time a new camera, I get the options from the right side of the image. If I create a clean project, I get the left side of the image camera options. How can this happen? Clearing project settings folder doesn't work!

    If you can't find what the image is saying, check: Target Display options

    Love new unity versions! Always fun to find out what breaks!
     
    Last edited: Sep 1, 2016
  15. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384

    Notice I reply on my last post, because it shows how I found the issue with the DK2. It's nothing about the last post, but it was about the build settings set for your project.

    I don't know if this is a feature or if this is a bug, but this solves it all!

    Download Unity3D 5.4.0p3 ( this is a patched version )
    Notice how 'Virtual Reality Supported' isn't checked, euh? in 5.4.0f3 it was, strange!!!
    Project is set to platform Android, your DK2 won't work =( snif snif
    Change: Build settings -> Platform = Windows......your DK2 works fine!
    Change: Build settings -> Platform = Android....... your DK2 works again!!!!!!!!!
    Big WTF moment and continue development


    It did work before, but old project switched to 5.4 with platform set to android will have this issue. Do the above to fix it. Keep the procedure to do this every time your DK2 isn't working to make sure it will work. :p

    This fixed it for me.

    Now this is fixed, how do you report this find of unusual behaviour of Unity3D, as the project causing is has been fixed and can't reproduce?
     
    Last edited: Sep 1, 2016
    EricJ13 likes this.
  16. mark-gehan

    mark-gehan

    Unity Technologies

    Joined:
    Nov 15, 2012
    Posts:
    4
    Make sure your video card drivers are up to date too. I ran into a similar problem this week and that seemed to fix it.
     
    BadSeedProductions likes this.
  17. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Mine was updated but still not working. What I described above sounds like a bug tbh. However I can't reproduce it.
     
  18. BadSeedProductions

    BadSeedProductions

    Joined:
    Dec 26, 2014
    Posts:
    144
    Im now using the 5.5.0b2 and DK2 will not work in testing (although tracking is working) but it is working on export now! This is an improvement in my opinion, just have to export each time I want to test...
     
  19. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    went from 5.3.x to 5.5.1 and dev kit 2 no longer works, don't know why...
     
  20. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Works as per advice if you install latest oculus setup - too bad they added forced health and safety messages
     
  21. Sudarto

    Sudarto

    Joined:
    May 3, 2017
    Posts:
    5
    What oculus runtime version did u use ?
    What utilities for Unity worked?
    What Exact version of unity 5.5.1 did u use?
    And last what version of DK2 did u use?

    Pls help Thx
     
  22. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Install the latest oculus runtime, it will complain that your DK2 is not installed properly and you can not complete setup (skip it) but it will work with 5.5.1f1 and probably anything since.

    Run Unity content with VR ticked and oculus included and the Oculus storefront/driver combo will run.
    The oculus store front has to run in the background as that is part of their driver system [?] which is annoying and it also forces you to accept health message each time.

    No VR utils tried, DK2 version not sure - we have 2 working.
     
    Sudarto likes this.
  23. Sudarto

    Sudarto

    Joined:
    May 3, 2017
    Posts:
    5
    Thank you , really appreciate
     
  24. Sudarto

    Sudarto

    Joined:
    May 3, 2017
    Posts:
    5
    Btw what Nvidia driver version you use?
    Did i need to use SDK? To play unity game that I make?
     
  25. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
  26. Sudarto

    Sudarto

    Joined:
    May 3, 2017
    Posts:
    5
    Its done andyz , thank you, many will know latest setup will work by read your help.
     
  27. JonesyLeo

    JonesyLeo

    Joined:
    Jan 8, 2017
    Posts:
    4
    Hi!
    I have a DK2 and I want to develop in Unity too!
    I'm sorry, I'm a bit late, but I would like to ask the final questions:
    (just to check if I understood)
    • Which version of Unity will work
    • Which version of runtime will work
    • Which version of Nvidia Drivers
    Thank You so, so much.

    Leonardo