Vibration
Vibration copied to clipboard
Use custom vibrations on mobile with this native Plugin for Unity (Android & iOS)
In VibrateNope your android pattern is { 0, 50, 50, 50 }, which is two vibratios instead of three. Android patterns are like { repeats, vibration_length, delay, vibration_length, delay, ......
Add
iOS: ios peek is weak,pop is strong + (void) vibratePeek { AudioServicesPlaySystemSoundWithCompletion(1519, NULL); // Actuate `Peek` feedback (weak boom) } + (void) vibratePop { AudioServicesPlaySystemSoundWithCompletion(1520, NULL); // Actuate `Pop` feedback...
Trying to call Vibration.VibrateIOS(ImpactFeedbackStyle.Medium) while inside the Unity Editor returns an error. It works fine once built to the device though. I'm running this on a Windows 10 computer, so...
Add feature to toggle vibration state. For example "Vibration.Toggle(false)" to disable any vibrations and true for enable. If toggled off - any vibration command will be ignored.