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

ValueiOS ProfileAndroid BehaviorRecommended Use
SoftestBumpLight ImpactShort TickKeyboard taps, UI hover, subtle shifts.
MediumBumpMedium ImpactSoft WaveStandard buttons, toggles, menu open.
HeavyBumpHeavy ImpactSharp ClickExplosions, heavy landings, combat hits.
SoftBumpSelectionHeavy ClickList scrolling, slider snaps, grid locking.
DoublePulseSuccessDouble ClickSuccess, unlock, level complete.
SoftDoublePulseWarningSoft DoubleLow ammo, minor warnings, status alerts.
TriplePulseErrorTriple PulseCritical 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.