Feel
5.1
The best way to improve your game's feel and make it extra juicy
|
A MonoBehaviour
that forwards global properties from HapticController and handles events
More...
Public Member Functions | |
void | OnBeforeSerialize () |
Loads all fields from HapticController. More... | |
void | OnAfterDeserialize () |
Writes all fields to HapticController. More... | |
Properties | |
float | outputLevel [get, set] |
Forwarded HapticController::outputLevel More... | |
bool | hapticsEnabled [get, set] |
Forwarded HapticController::hapticsEnabled More... | |
A MonoBehaviour
that forwards global properties from HapticController and handles events
While HapticSource provides a per-clip MonoBehaviour
API for the functionality in HapticController, HapticReceiver provides a MonoBehaviour API for the global functionality in HapticController.
HapticReceiver is also responsible for global event handling, such as an application focus change. To make this work correctly, your scene should have exactly one HapticReceiver component, similar to how a scene should have exactly one AudioListener
.
In the future HapticReceiver might receive parameters and distance to HapticSource components, and can be used for global parameter control through Unity Editor GUI.
void Lofelt.NiceVibrations.HapticReceiver.OnAfterDeserialize | ( | ) |
Writes all fields to HapticController.
void Lofelt.NiceVibrations.HapticReceiver.OnBeforeSerialize | ( | ) |
Loads all fields from HapticController.
|
getset |
Forwarded HapticController::hapticsEnabled
|
getset |
Forwarded HapticController::outputLevel