Provides a single entry point for triggering haptic feedback. Owns enabled state, cooldown, cancellation policy, and backend selection. Creates an instance automatically when first accessed via Instance.
More...
|
|
bool | CanPlayNow () |
| | Returns true when haptics are enabled, backend support is available, and cooldown has expired.
|
| void | Play (GamepticPresetId preset) |
| | Plays a predefined preset resolved by GamepticPresets. Presets are returned as new instances and can be modified by the caller. Playback respects cooldown, enabled state, and cancellation settings.
|
| void | Play (GamepticPresetId preset, Action onComplete) |
| | Plays a predefined preset resolved by GamepticPresets and calls onComplete when finished.
|
| void | Play (GamepticSignal signal) |
| | Plays a single haptic signal using the active backend. If a previous playback is active, it may be canceled depending on settings. Playback respects cooldown and the global enabled toggle.
|
| void | Play (GamepticSignal signal, Action onComplete) |
| | Plays a single haptic signal using the active backend and invokes onComplete after its duration elapses.
|
| void | Play (GamepticSequence sequence) |
| | Plays a haptic sequence in order using realtime delays. If a previous playback is active, it may be canceled depending on settings. Playback respects cooldown and the global enabled toggle.
|
| void | Play (GamepticSequence sequence, Action onComplete) |
| | Plays a haptic sequence in order and invokes onComplete when the sequence finishes.
|
|
void | Stop () |
| | Stops the current playback if any. Cancels sequence coroutines and calls backend stop when supported. This is safe to call when nothing is playing.
|
|
|
GamepticManagerSettings | Settings = new() [get] |
| | Global settings controlling haptic playback.
|
|
static GamepticManager | Instance [get] |
| | Gets the global GamepticManager instance. If no instance exists, a new GameObject is created and the component is added. The created instance persists across scene loads.
|
|
bool | IsEnabled [get, set] |
| | Gets or sets whether haptics are enabled globally. When persistence is enabled in settings, the state is stored in PlayerPrefs. When persistence is disabled, the state is stored only in memory.
|
Provides a single entry point for triggering haptic feedback. Owns enabled state, cooldown, cancellation policy, and backend selection. Creates an instance automatically when first accessed via Instance.
The documentation for this class was generated from the following file:
- SCG/Gameptics/Core/GamepticManager.cs