- Home /
How to vibrate the ios and android device from unity C# code?
Hi Guys,
I want to vibrate the android and ios device when the user destroyed a large number of enemies.So,I try Handheld.Vibrate & IphoneUtils.Vibrate on ios7 devices but it is not working at all. Please provide the solution for this asap.
Thanks Priyanka Tyagi
For android you can do it with JNI. You can join this room for discussion.
Answer by tanoshimi · Apr 03, 2014 at 05:35 AM
This works fine for me...:
function OnGUI () {
if (GUI.Button (Rect (0, 10, 100, 32), "Vibrate!"))
Handheld.Vibrate ();
}
Answer by ysalmi · Nov 16, 2016 at 01:09 PM
iOS opened up vibration only since iOS 10.
There is a plugin for the new vibration features on the asset store: https://www.assetstore.unity3d.com/en/#!/content/73225
Answer by colealucas · Jan 27, 2021 at 10:07 PM
Hi, so... here is a blog post about Vibration in Unity: https://lucas-games.com/tutorials/trigger-device-vibration-unity.html
Your answer
Follow this Question
Related Questions
Xcode 5 + iOS 7 Status Bar 1 Answer
iBeacon waking up Unity iOS App? 0 Answers
TestFlight SDK and Xcode Issues 3 Answers
Social.ShowAchievementsUI() not showing achievements 1 Answer