wshhsw2011 / Vibration

Use custom vibrations on mobile with this native Plugin for Unity (Android & iOS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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();

About

Use custom vibrations on mobile with this native Plugin for Unity (Android & iOS)

License:Apache License 2.0


Languages

Language:C# 50.7%Language:Objective-C++ 37.8%Language:Objective-C 11.6%