API reference
API reference
Select your platform
No SDKs available
No versions available

SystemHaptics Class

Provides a static API for managing and playing system haptic feedback patterns on supported controllers.
This class is intended for use in applications that require consistent, system-level haptic feedback, such as UI interactions, Notifications or other standardized events.
The SystemHaptics class loads, caches, and plays predefined haptic patterns (such as "Test", "Hover", "Press") from resources at runtime. Patterns are defined as .systemhaptic files, which are parsed into HapticsParametricVibration structs for playback via the ParametricHaptics API.
On initialization (before scene load), the class attempts to load all available haptic patterns from the Resources/SystemHapticsPatternClips/ directory, mapping each SystemHapticsPattern enum value to its corresponding vibration data. Patterns are cached for efficient lookup and playback.
To play a haptic pattern, call SystemHapticsPlayPattern with the desired pattern and target controller. If the pattern is not found in the cache, a warning is logged.
To customize and play back haptic events, please refer to Meta Haptics Studio and the Meta XR Haptics SDK for Unity.

Member Enumerations

Enumeration SystemHapticsPattern

Represents the set of predefined system haptic feedback patterns.
A pattern can be played back on a target playback location using SystemHapticsPlayPattern.
Success
Use to indicate a successful action, completion of a task, or "positive" toast (notification).
Warning
Use to indicate a warning or non-critical issue that requires user attention.
Error
Use to indicate a critical error or failure that requires immediate user attention.
Hover
Use when the user hovers over an interactive element or object.
Press
Use when the user presses a button or similar control.
Select
Use to confirm a selection action, such as toggling a switch on or activating a checkbox.
Deselect
Use to confirm a deselection action, such as toggling a switch off or deactivating a checkbox.
Grab
Use when the user grabs or picks up a component or object.
Release
Use when the user releases a previously grabbed component or object.

Static Member Functions

Plays a system haptic pattern from the cached dictionary at the desired playback location.
Parameters
pattern
The desired SystemHapticsPattern haptic effect.
controller
The target controller to play back the haptic effect on.
Did you find this page helpful?