Feel  5.1
The best way to improve your game's feel and make it extra juicy
Lofelt.NiceVibrations.HapticReceiver Class Reference

A MonoBehaviour that forwards global properties from HapticController and handles events More...

Inheritance diagram for Lofelt.NiceVibrations.HapticReceiver:

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...
 

Detailed Description

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.

Member Function Documentation

◆ OnAfterDeserialize()

void Lofelt.NiceVibrations.HapticReceiver.OnAfterDeserialize ( )

Writes all fields to HapticController.

◆ OnBeforeSerialize()

void Lofelt.NiceVibrations.HapticReceiver.OnBeforeSerialize ( )

Loads all fields from HapticController.

Property Documentation

◆ hapticsEnabled

bool Lofelt.NiceVibrations.HapticReceiver.hapticsEnabled
getset

Forwarded HapticController::hapticsEnabled

◆ outputLevel

float Lofelt.NiceVibrations.HapticReceiver.outputLevel
getset

Forwarded HapticController::outputLevel


The documentation for this class was generated from the following file: