Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

Input.accelerationEventCount

Switch to Manual
public static var accelerationEventCount: int;

Description

Number of acceleration measurements which occurred during last frame.

	// Check if we got any acceleration measurements during last frame

function Update () { if (Input.accelerationEventCount > 0) print ("We got new acceleration measurements"); }