shahab14 / android-vibration-in-unity

Android Vibration Plugin For Unity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

android-vibration-in-unity

It doesn't support IOS devices.

Custom Vibration Amplitudes support devices which has this feature.

Download package from release page.

You can use these functions to make vibrations in your game:

VibrationHelper.VibrateClick(milliseconds); // Vibrate with Click Effect amplitude
VibrationHelper.VibrateDoubleClick(milliseconds); // Vibrate with Double Click Effect amplitude
VibrationHelper.VibrateHeavyClick(milliseconds); // Vibrate with Heavy Click Effect amplitude
VibrationHelper.VibrateTick(milliseconds); // Vibrate with Tick Effect amplitude

These predefined effects work on Android API 29. For other custom Amplitude use this function:

VibrationHelper.VibrateWithAmplitude(milliseconds, amplitude);

amplitude must be a value between 1 and 255

You can use VibrationHelper.minAmplitude (=1)and VibrationHelper.maxAmplitude(=255) for getting min and max amplitude.

About

Android Vibration Plugin For Unity

License:MIT License


Languages

Language:C# 100.0%