-
-
Notifications
You must be signed in to change notification settings - Fork 2
Fade Rect
eisclimber edited this page Nov 3, 2024
·
3 revisions
class in ExPresSXR.UI / Extends MonoBehavior
GameObject instantiable via ExPresS XRFade Rect
A HUD Canvas item that can be faded between a certain color (default: black) and transparency. These fades can either be done over a certain time or instantaneous.
It is set to be rendered in layer UI Always on Top
, meaning it can be used as a full screen fade.
When used in the context of an XR Rig, the rig provides convenience functions to fade in and out.
-
Image _fadeImage
: Reference to theUnityEngine.UI.Image
used for fading.
-
Color fadeColor
: The color to be faded to. Default:new(0.0f, 0.0f, 0.0f, 0.0f
= Transparent Black. -
float fadeToBlackTime
: Duration in seconds of a fade to black. Default:0.5f
-
float fadeToClearTime
: Duration in seconds of a fade to transparent. Default:0.5f
-
bool screenCompletelyVisible
: (readonly) Getter to check if thefadeColor
is fully opaque. -
bool screenCompletelyHidden
: (readonly) Getter to check if thefadeColor
is fully transparent.
-
void FadeToColor(bool instant = false)
: Starts a fade to color. This will be done over the duration offadeToBlackTime
ifinstant = false
or instantaneously otherwise. -
void FadeToClear(bool instant = false)
: Starts a fade to clear. This will be done over the duration offadeToClearTime
ifinstant = false
or instantaneously otherwise.
-
OnFadeToColorCompleted
: Emitted when a Fade to Color was completed. -
OnFadeToClearCompleted
: Emitted when a Fade to Clear was completed.
-
FadeDirection
: Specifies the direction of the fade. EitherNone
,ToColor
orToClear
Autor: Luca 'eisclimber' Dreiling; License: MIT
- Getting Started
- Development and Contribution
- Misc
- Experimentation
- Data Gatherering
- Eye Tracking
- ExPresS XR Rig
- Interaction
- Base Button
- Button Quiz
- Collision Hand Rumbler
- Collision Sound Emitter
- Interactables
- Haptic Impulse Trigger
- Socket Interactors
- Value Range Interactables
- Inverse Kinematics
- Localization
- Minigames
- Archery
- Arrow
- Bow
- Dojo Example
- Object Pool
- Target Spawner
- Coin Scale
- Coin Throw
- Excavation
- Target Area
- Archery
- Misc
- Movement
- Presentation
- UI