C# Class OVRScreenFade

Fades the screen from black after a new scene is loaded.
Inheritance: MonoBehaviour
Show file Open project: leapmotion/ImageGrid Class Usage Examples

Public Properties

Property Type Description
fadeColor Color
fadeTime float

Public Methods

Method Description
Awake ( ) : void

Initialize.

OnDestroy ( ) : void

Cleans up the fade material

OnEnable ( ) : void

Starts the fade in

OnLevelWasLoaded ( int level ) : void

Starts a fade in when a new level is loaded

OnPostRender ( ) : void

Renders the fade overlay when attached to a camera object

Private Methods

Method Description
FadeIn ( ) : IEnumerator

Fades alpha from 1.0 to 0.0

Method Details

Awake() public method

Initialize.
public Awake ( ) : void
return void

OnDestroy() public method

Cleans up the fade material
public OnDestroy ( ) : void
return void

OnEnable() public method

Starts the fade in
public OnEnable ( ) : void
return void

OnLevelWasLoaded() public method

Starts a fade in when a new level is loaded
public OnLevelWasLoaded ( int level ) : void
level int
return void

OnPostRender() public method

Renders the fade overlay when attached to a camera object
public OnPostRender ( ) : void
return void

Property Details

fadeColor public property

The initial screen color.
public Color fadeColor
return Color

fadeTime public property

How long it takes to fade.
public float fadeTime
return float