Detailed Member Reference
Namespace: Canley.Utility.Haptics
Class: CanleyHaptics
HapticStyle
public enum HapticStyle- Description: A collection of qualitative feedback profiles. These styles allow you to choose haptics based on the “feel” of the event rather than technical durations.
- Internal Logic:
- iOS: Automatically maps to Taptic Engine Impact and Notification generators.
- Android: Selects the highest fidelity vibration primitive supported by the device’s SDK.
Enum Values
| Value | iOS Profile | Android Behavior | Recommended Use |
|---|---|---|---|
SoftestBump | Light Impact | Short Tick | Keyboard taps, UI hover, subtle shifts. |
MediumBump | Medium Impact | Soft Wave | Standard buttons, toggles, menu open. |
HeavyBump | Heavy Impact | Sharp Click | Explosions, heavy landings, combat hits. |
SoftBump | Selection | Heavy Click | List scrolling, slider snaps, grid locking. |
DoublePulse | Success | Double Click | Success, unlock, level complete. |
SoftDoublePulse | Warning | Soft Double | Low ammo, minor warnings, status alerts. |
TriplePulse | Error | Triple Pulse | Critical errors, invalid actions, failure. |
Example Usage
using Canley.Utility.Haptics;
using UnityEngine;
public class GameEvents : MonoBehaviour
{
public void OnItemCollected()
{
// Triggering the 'DoublePulse' style for positive feedback
CanleyHaptics.Trigger(CanleyHaptics.HapticStyle.DoublePulse);
}
}NOTE
This enum is used natively by the Visual Scripting Module, where it appears as a searchable dropdown menu for non-coding designers.