Skip to content

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

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

CCaiJI/Vibration

 
 

Repository files navigation

Vibration

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

Installation

Copy and paste the entire Vibration folder in your Unity3D Assets folder or download and import the Vibration.unitypackage file.

Use

Initiatlisation

Initialize the plugin with this line before using vibrations:

Vibration.Init();

Vibrations

iOS and Android

Default vibration

Use Vibration.Vibrate(); for a classic default ~400ms vibration

Pop vibration

Pop vibration: weak boom (For iOS: only available with the haptic engine. iPhone 6s minimum or Android)

Vibration.VibratePop();

Peek Vibration

Peek vibration: strong boom (For iOS: only available on iOS with the haptic engine. iPhone 6s minimum or Android)

Vibration.VibratePeek();

Nope Vibration

Nope vibration: series of three weak booms (For iOS: only available with the haptic engine. iPhone 6s minimum or Android)

Vibration.VibrateNope();

Android Only

Custom duration in milliseconds

Vibration.Vibrate(500);

Pattern

long [] pattern = { 0, 1000, 1000, 1000, 1000 };
Vibration.Vibrate ( pattern, -1 );

Cancel

Vibration.Cancel();

About

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

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 78.5%
  • Objective-C++ 16.6%
  • Objective-C 4.9%