Use custom vibrations on mobile with this native Plugin for Unity (Android & iOS)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Plugins/iOS/Vibration
.gitignore
LICENSE
README.md
Vibration.cs
Vibration.cs.meta

README.md

Vibration

Native plugin for Unity for iOS and Android. Use custom vibrations on mobile.

iOS and Android

  • Use Vibration.Vibrate(); for a 300ms vibration

iOS Only

  • Pop vibration (iPhone 6 minimum)

Vibration.VibratePop();

  • Peek vibration (iPhone 6 minimum)

Vibration.VibratePeek();

  • Nope vibration (iPhone 6 minimum)

Vibration.VibrateNope();

Android Only

  • Custom duration in milliseconds

Vibration.Vibrate(500);

  • Pattern
long [] pattern = { 0, 1000, 1000, 1000, 1000 };
Vibration.Vibrate ( pattern, 0 );
  • Cancel

Vibration.Cancel();