Search Unity

Scene Fade on GearVR

Discussion in 'AR/VR (XR) Discussion' started by Mr-Tsunami, Aug 11, 2015.

  1. Mr-Tsunami

    Mr-Tsunami

    Joined:
    Jul 15, 2015
    Posts:
    21
    Hello! How do you guys make your scenes fade in/out while switching levels?
    I found some technics (one using GUITexture and another with raw GL stuff) but unfortunately they don't work with Gear VR.
     
  2. jules43

    jules43

    Joined:
    Jul 20, 2015
    Posts:
    10
    The OVRScreenFade script seems to work fine (at least for initial Fade In). Just drag it onto your Left and Right Eye Anchor objects in the OVRCameraRig, set the Fade Shader (I'm using Unlit/Transparent HUD) and set your colour / time.

    There's a great resource on fading here: http://wiki.unity3d.com/index.php?title=FadeInOut

    To handle fade in/out between scenes you could combine the OVR one with the "Another Fade Script in C#, Extended Singleton" on this page to create one that fades between scenes.
     
  3. Mr-Tsunami

    Mr-Tsunami

    Joined:
    Jul 15, 2015
    Posts:
    21
    Thanks! With little modifications OVRScreenFade works with unity native VR feature. No legacy OVR stuff is required.
     
  4. reddo

    reddo

    Joined:
    Jul 1, 2015
    Posts:
    30
    Hi,
    I'm also using OVRScreenFade script with Gear VR to fade into scenes but still can't work out how to fade out with correct code. Did you find out how to fade out and do you have any tips?

    Thanks for any help!

    Edit: Got the Fade Out happening. Just created another script based on OVRScreenFade and swapped some code for fading out from here https://www.reddit.com/r/oculus/comments/31ttkh/oculus_fade_to_black/
     
    Last edited: Aug 21, 2015
  5. vicator

    vicator

    Joined:
    Oct 12, 2014
    Posts:
    26
    You could also have a box around your camera, then increase or decrease the transparency of its material to render a fade in or fade out.
     
  6. shakhruz

    shakhruz

    Joined:
    Feb 17, 2011
    Posts:
    43
    OVRScreenFade did not work for me either so i just created a sphere around my camera with a simple color shader that I fade in and out.
     
    SRemec and vicator like this.