02 · Hardware Haptic Feedback
Used to trigger the mobile device's Taptic Engine upon button clicks, combos, or errors.
Implementation — Direct Component Attachment
- Open the
02_Haptic_Demoscene. - Select any UI
Buttonnode in the scene (e.g., a "Match" button or "Buy" button). - Click Add Component →
TelegramHapticButton. - In the Inspector panel, select the vibration intensity from the Style dropdown:
| Style | Effect |
|---|---|
Light | Subtle physical impact |
Medium | Standard physical impact |
Heavy | Strong physical impact |
Rigid | Crisp impact style |
Soft | Cushioned impact style |
Success | Success notification pattern |
Warning | Warning notification pattern |
Error | Error notification pattern |
Runtime Behavior
No custom OnClick listener code required.
Clicking the button automatically dispatches the corresponding haptic feedback command to the mobile device.
Editor Simulation
Inside the Unity Editor, haptic commands are automatically printed as simulated logs to the Console — no physical device required for testing.
Demo Reference
See Packages/com.fasttma.core/Samples/02_Haptic for the full Demo implementation.