Search Unity

Unity 5.1 : Rift in editor is not working

Discussion in 'AR/VR (XR) Discussion' started by Samsson, Jun 10, 2015.

  1. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Hello,


    I have Unity 5.1 and the latest runtime (0.6.0), my project has "Virtual Reality Supported" on and my oculus rift is in "extended mode" + "maximize on play" but nothing change when i hit play... the editor does not display anything in the rift.

    My rift is well working with others demo, including the oculus demo showcase.

    It's now 3 hours that i'm tring to find out what's wrong ! Do you what i missed ?
     
  2. kstafferton

    kstafferton

    Joined:
    Jan 13, 2015
    Posts:
    5
    I have the same problem but using direct HMD access seems to work absolutely fine.

    Personally I prefer using direct mode anywhere and I am not sure why extended is being recommended now Unity supports it from the editor.
     
  3. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Direct HMD doens't work too...
     
  4. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    @Samsson If you have changed the VRSettings.loadedDevice to VRDeviceType.None, even though you have VirtualRealityEnabled it will be set to none. Try checking the loadedDevice to see if it is set to Oculus in a start method of one of your scripts. Also check if VRSettings.enabled is true. If both are set to the correct value, try closing the Editor and deleting the project settings and then Reopen the Editor and recheck VirtualRealityEnabled.
     
  5. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Hi Ed,


    You now i made simple so no paramaters can be in conflict : i have started an empty project with nothing inside and the result is still the same.
     
  6. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    Did you set the lighting to Gamma? Make sure Stereoscopic rendering is also not toggled on. Stereo rendering automatically happens. That toggle is actually for VRDeviceType.stereo.
     
  7. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    The compiler does not recognize any of this commands :

    VRSettings.enabled = true;
    VRSettings.showDeviceView = true;

    I get compilation errors. Why ?
     
  8. MrAsmoday

    MrAsmoday

    Joined:
    Jun 11, 2015
    Posts:
    19
    Also make sure your in Dx11 Graphics API because i had this problem until i switched.
     
  9. Neiviv

    Neiviv

    Joined:
    Jul 26, 2013
    Posts:
    2
    Maybe you forgot to add "Using UnityEngine.VR" ?
     
    EdBlais likes this.
  10. JonasMa

    JonasMa

    Joined:
    May 2, 2014
    Posts:
    1
    I have the same Problem here with my Rift not working with Unity 5.1 even tough I got all the configs.
    @Samsson did you fix your problem already?
     
  11. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I've seen this quite a few times - but what reliable fixes this for me is switching "Virtual Reality Supported" off in the editor, and then switching it on again. A few times I had to reboot my machine to make it work ... but that was rare (and still during beta).

    Also, for me, both Extended Mode and Direct to Rift Mode do work ... but it seemed as if Unity is using "Direct Mode" even when I have the mode set to Extended Mode in the settings (which, if true, isn't really a problem - extended mode is just trouble IMHO that you really only want to use if you have no other option).
     
  12. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    I uptated to Unity 5.1.1, still the same problem : doesn't works in editor or in build.

    I have this error :
    Failed to load 'C:/Program Files/Unity/Editor/Data/VR/OVRPlugin.dll' with error 'The operation was successful
    ', GetDllDirectory returned ''. If GetDllDirectory returned non empty path, check that you're using SetDirectoryDll correctly.
     
  13. Jacker

    Jacker

    Joined:
    Jul 16, 2013
    Posts:
    4
    I get same problem Failed to load 'C:/Program Files/Unity/Editor/Data/VR/OVRPlugin.dll' with error '
     
  14. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    This thread says that it could be related to missing VC redistributable dependencies. Oculus does link against VC 2013 -- try what they suggest and install the 32 and 64 bit versions of the redistributable.

    Edit: Here's a link to what you need to install.
    Edit: Confirmed that this has fixed some other people's issues with this same error.
     
    Last edited: Jun 22, 2015