Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Handheld.Vibrate

static function Vibrate(): void;
static void Vibrate();
static def Vibrate() as void

Description

Triggers device vibration.

	// Press button to vibrate
	function OnGUI () {
		if (GUI.Button (Rect (0, 10, 100, 32), "Vibrate!"))
			Handheld.Vibrate ();
	}