Skip to content

02 · Hardware Haptic Feedback

Used to trigger the mobile device's Taptic Engine upon button clicks, combos, or errors.


Implementation — Direct Component Attachment

  1. Open the 02_Haptic_Demo scene.
  2. Select any UI Button node in the scene (e.g., a "Match" button or "Buy" button).
  3. Click Add Component → TelegramHapticButton.
  4. In the Inspector panel, select the vibration intensity from the Style dropdown:
StyleEffect
LightSubtle physical impact
MediumStandard physical impact
HeavyStrong physical impact
RigidCrisp impact style
SoftCushioned impact style
SuccessSuccess notification pattern
WarningWarning notification pattern
ErrorError 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.