Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"Virtual Reality Supported" repeatedly being turned back on somehow after being disabled?

Discussion in 'AR/VR (XR) Discussion' started by skullthug, Nov 14, 2016.

  1. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    202
    Unity 5.4.1f1
    I've had this happen on two wildly different and separate machines now, which is leading me to think this is some sort of editor bug. I'll disable Virtual Reality Supported, but after running in the editor a couple times it will somehow get re-enabled.
    It's pretty annoying. Has anyone else been having this occur?
     
    1000cranes likes this.
  2. NickAtUnity

    NickAtUnity

    Unity Technologies

    Joined:
    Sep 13, 2016
    Posts:
    84
    Can you please file a bug? That will put it on the list for our QA team to investigate.
     
    1000cranes likes this.
  3. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    202
  4. 1000cranes

    1000cranes

    Joined:
    Jun 16, 2015
    Posts:
    6
    I've been searching all over for a solution to this - disabling vr mode works in the editor but all scenes open in stereoscopic view when deployed to an android
     
  5. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    202
    @1000cranes yeah that was happening to me *constantly* when trying out a Google cardboard build. It got so annoying I decided to just wait on upgrading to 5.4+
     
  6. 1000cranes

    1000cranes

    Joined:
    Jun 16, 2015
    Posts:
    6
    @skullthug I saw your bug report was opened on the 16th so hopefully we'll get a resolution soon!
    I'll let you know if I come across any fixes in the mean time.
     
  7. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    I've never seen this bug but sounds annoying! Perhaps because of our tool the bug never occurs? When we click "Build GearVR" or "Build GoogleVR" the player settings are always saved properly.

    I wouldn't call this a 'fix' because I've never experienced the problem. Just curious if you set VR supported via Editor Script (as our asset does) if the issue would occur.
     
  8. chunk_split

    chunk_split

    Joined:
    Dec 25, 2017
    Posts:
    7
    For anyone else who got here from Google also having this issue, it's probably because you have SteamVR in your project and it's automatically re-enabling the "Virtual Reality Supported" setting. In my case, I still need the SteamVR asset, but need to be able to test in a separate scene and don't want VR enabled while I'm working.

    To fix: Go to Edit -> Preferences... -> SteamVR and uncheck the pesky setting "Automatically Enable VR", see below.

     

    Attached Files:

    MoMonay, Quaggles, ckriger and 6 others like this.
  9. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    202
    Ah right, that was the same thing that was happening to me. SteamVR was responsible.
    Sorry, it was discussed in the bug report so I forgot to come back and update this thread.
     
  10. Marcus9

    Marcus9

    Joined:
    Dec 8, 2015
    Posts:
    1
    If you are using VRTK with SteamVR, there is also a setting which enables the Virtual Reality Supported checkbox in Player Settings automatically after the projects runs. This is done in "VRTK_SDK Manager" script under Setups -> Auto Manage VR Settings. You need to uncheck this box to prevent VRTK from automatically enabling virtual reality.
     
    MoMonay, JasperCiti and olemidt1 like this.
  11. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Same is true after you imported the Oculus Utilities. They too contain an VR auto enabling editor script, which i find pretty annoying and silly. At last the developer should well be aware when and if he/she wants to enable VR or not
    The script in question is Oculus\VR\Editor\OVREngineConfigurationUpdater.cs
    The method named EnforceVRSupport() is called in OnUpdate() and the script itself marked as [InitializeOnLoad], thus it runs automatically
     
    Hattoriseed likes this.
  12. KingKRoecks

    KingKRoecks

    Joined:
    Jul 28, 2013
    Posts:
    155
    Thanks for the knowledge share, guys. I made the changes described above (as well as searching "PlayerSettings.virtualRealitySupported = true" in code) and was able to get the checkbox to stop showing.

    Now for the next problem; Even though the checkbox is off, Gear VR still intercepts the application launch. Anyone know why?
     
  13. mynameisjohnj

    mynameisjohnj

    Joined:
    Mar 18, 2017
    Posts:
    11
    @KingKRoecks do you have your .osig file in there? Maybe it's seeing that.
     
  14. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    It is happening the opposite to me, i turn it on and is turned off every time i start Unity 2018.2 using htc vive
     
    jangomoose and alekz1k like this.
  15. Gooberverse

    Gooberverse

    Joined:
    May 17, 2015
    Posts:
    3
    Does anyone else have an idea of how to prevent Unity from starting VR (either Ocululs or Steam) when you click "Play" in the editor? I've done everything I can and it still starts up. I had to unplug my Rift because when it is plugged in, my Raycasts are offset and it makes working impossible.

    I've searched for virtualRealitySupported in all of my code and VR support is still being turned on. At least, either Oculus or SteamVR opens whenever I click "Play" in the editor. I have unchecked VR support in the XR settings. I have removed OpenVR and Oculus from the list of VR support.
     
  16. alekz1k

    alekz1k

    Joined:
    Dec 14, 2014
    Posts:
    16
    Hey, I'm experiencing something similar but with the 'Mixed Reality Capture' box in the OVR Manager script (from Oculus Utilities). Any tip? I enabled it once to check what it was about and then turned it off. But since then, even if not checked it enables itself automatically when I press play. Im on Unity 2018.3.2f and I dont have SteamVR in my assets.

    Thanks for any lead!
     
  17. alekz1k

    alekz1k

    Joined:
    Dec 14, 2014
    Posts:
    16
    Nevermind, just solved it by replacing the ovrmanager script in my inspector by a new one.