Triggers device vibration.
Note: Duration of vibration is determined by the operating system of the target platform. To configure advanced vibration settings, use platform specific libraries.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void OnGUI() { if (GUI.Button(new Rect(0, 10, 100, 32), "Vibrate!")) Handheld.Vibrate(); } }