Search Unity

enable vr and stereoscopic by script

Discussion in 'AR/VR (XR) Discussion' started by ghiboz, Jun 29, 2015.

  1. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hi all!
    it's possible enable the vr by a script?

    so, enabling or disabling these settings:



    and also changing the color space, until the 'bug' of the linear wont be solved...

    thanks!
     
  2. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    Hi ghiboz,

    While it is possible to change those settings through script, I don't advise you to do it. Currently, enabling VR in the player settings requires Unity to reload all graphics objects and doing that during runtime may have unexpected results.

    If you want to turn the device off or on during runtime try using VRSettings.enabled

    Check out the docs here

    Also, stereoscopic rendering should not be enabled for vr projects
     
  3. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465