Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Feedback I quit using VR in Unity 2019+

Discussion in 'VR' started by NewMagic-Studio, Jan 4, 2022.

  1. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    How the hell works VR in Unity 2019+ , nothing works! My scene first get an eye white and other black, one of my assets i bought in the asset store stops working and gives several errors, then i get to fix the black and white error removing other of my VR assets but when i create an empty scene with a cube the cube follows the camera and it is not a children of the camera! There is not even single pass anymore, now is single pass instanced or multi pass, when i try to use multi pass Unity just crash all the time! I have been more than a week with this, it is impossible make it work!
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,493
    is that unity/openxr or other vr plugin?
     
  3. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    I am trying to use SteamVR, which i think use openXR
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,493
    i still prefer the original steamvr without openxr, it was so easy and had all the features ready (teleport, hands etc.)

    but i'd guess your issue could be wrong combination of vr plugins or image effect plugins or unity versions..
    and better test setting up in empty project, older steamvr version or other plugins, or bad settings might break things.
     
  5. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    Don't even work an empty scene with a cube, is horrible
     
  6. colinleet

    colinleet

    Joined:
    Nov 20, 2019
    Posts:
    189
    SteamVR/OpenVR is not "OpenXR" to any extent, they are fully separate plugins, and fundamentally are not compatible with each other. SteamVR was particularly known to be terribly incompatible with the new XR management plugin in terms of player inputs. No wonders you wanted to quit, and had no luck!

    1) To start with they use entirely different input systems (legacy input vs the new device/input action based system). Do not rely on the VR code you made over three years ago for almost any XR systems interactions, they'll all need updating to the new standards. Those standards are only starting to be settled in the last few months with OpenXR -- (in that they've reached the full set of previously supported features in a stable way).

    Note: I can only say this for what my game's needs / my testing hardware. For me a full time dev who switched over to OpenXR the first week or so it was out... it took around 11.5 months for all the bugs I found in the first month to be fully worked out. These new XR packages were (some still are) in preview for good reasons.

    That is a good thing! It means they're getting better, but they're not for everyone yet.

    2) If you're using deferred rendering on the non scriptable render pipeline, yes single pass was removed. What you want to use is single pass instanced now -- it's the preferred/required rendering method for URP/HDRP. You'll also want to switch to URP to support Android. See: https://docs.unity3d.com/Manual/SinglePassInstancing.html

    Yeah non-single pass instanced shaders will only bring you constant headaches from now on. Single pass instanced shaders suck, but they're really required for performant VR at any scale.

    Assets from the store more often than not are not written for single pass instanced (if they're more than a couple years old), and thus must be manually updated (hard to do if you don't know shaders well, and sometimes even if you do). It's better to stick with shader graph wherever you can. Many assets on the store which do claim to be compatible with VR are only tested on one or two headset types, because they're expensive, and/or often were written only for legacy (pre-2020) XR systems/assets get abandoned/or don't get updated to support for the new requirements for VR (single pass instanced)/or never supported single pass instanced to begin with. Long passed (2019) reliability is no indicator of future reliability here.

    Sounds like you didn't add the new default camera rig to the empty scene. I recommend the default room scale one for fast testing. (Or you had more serious issue with trying to use incompatible assets for entirely different legacy XR plugins.)

    Good luck!

    All of Unity XR basically has had an occasionally body nose since 2020. Let me be Frank here: Things have improved a lot and I'm really proud of how much better it's gotten, especially when you compare it to the absolute abject cluster f*** that used to be required when developing for more than two+ legacy VR plugins. I commented on a post going into a lot more detail about this last year (it's more than a bit dated at this point, but it'll give you an idea as to how turbulent it's been): https://forum.unity.com/threads/creating-a-business-oriented-vr-interface.867781/#post-6794909
     
    Last edited: Jan 7, 2022
  7. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    But i am using too many assets from the asset store which are not compatible with instanced shaders, i know to write shaders but don't know if i will be able to fix those assets to work with instanced or how long will take. Time is important too, changing all to this who knows how much time takes, probably at least a month in case i am able to fix all errors. Also i was using builtin functionalities in SteamVR like using bows, which was very well made, without using SteamVR i would have to make all that from start, which can take also a lot of time, it is like remaking the game itself with no guarantee it will be fixed
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    The only way I've found success in Unity's VR really is to ignore OpenXR, ignore OpenVR, and just stick to the XR Management system in Unity. This will decide what you need to use for you, import the required packages etc.

    That, and URP with zero asset store shaders.
     
  9. colinleet

    colinleet

    Joined:
    Nov 20, 2019
    Posts:
    189
    Also: URP + "Asset store shaders" are fine as long as they're made with shader graph!
     
  10. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,886
    Just curious - if I've already chosen to use OpenXR how do I go back to XR management?
     
  11. cyenketswamy

    cyenketswamy

    Joined:
    Jul 24, 2015
    Posts:
    41
    I used to work with VR in Unity 2017 and VR was quite straightforward. I just configured for Windows Mixed Reality and hit play and worked perfectly.
    These newer versions of Unity have changed so much. I can't find the WMR plug in. It's like I have to restart learning everything about VR again. Unreal Engine is quite easy for VR you just need a few steps to configure output to the VR headset.