![]() |
Feel 5.9.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. | |
| void | OnAfterDeserialize () |
| Writes all fields to HapticController. | |
Properties | |
| float | outputLevel [get, set] |
| Forwarded HapticController::outputLevel. | |
| bool | hapticsEnabled [get, set] |
| Forwarded HapticController::hapticsEnabled. | |
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.