-
-
Notifications
You must be signed in to change notification settings - Fork 2
Color Switcher
eisclimber edited this page Feb 25, 2024
·
3 revisions
class in ExPresSXR.Misc / Extends MonoBehavior
Component added via Component Menu
Switches the Material/Color of a GameObject between the original material and an alternative Material.
Optionally the material switches can be performed for a set amount of time and then switched back or simply be toggled.
-
Material alternativeMaterial
: The material that is replacing the material applied to the GameObject via Editor. -
float switchDuration
: The duration the material is switched when calling the '...ForSwitchDuration' functions. -
bool requireOriginalMaterialMatch
: When changing to the Original Material, the object's material must be the Alternative Material. -
bool requireAlternativeMaterialMatch
: When changing to the Alternative Material, the object's material must be the Original Material.
-
void ActivateAlternativeMaterial()
: Activates thealternativeMaterial
. -
void ActivateOriginalMaterial()
: Activates the original Material. -
void ToggleMaterial()
: Activates the current Material. -
void ActivateAlternativeMaterialForASecond()
: Activates thealternativeMaterial
for a second. -
void ActivateOriginalMaterialForASecond()
: Activates the original Material for a second. -
void ToggleMaterialForASecond()
: Toggles the current material for a second. -
void ActivateAlternativeMaterialForSwitchDuration()
: Activates thealternativeMaterial
for the duration ofswitchDuration
. -
void ActivateOriginalMaterialForSwitchDuration()
: Activates the original Material for the duration ofswitchDuration
. -
void ToggleMaterialForSwitchDuration()
: Toggles the current Material for the duration ofswitchDuration
.
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
- Exit Game Interactable (Script Deprecated)
- Interactables
- Haptic Impulse Trigger
- Socket Interactors
- Inverse Kinematics
- Localization
- Minigames
- Coin Scale
- Coin Throw
- Sword Cleaning
- Misc
- Movement
- Presentation
- UI