Input.accelerationEventCount

Switch to Manual
public static int accelerationEventCount ;

Description

上一帧期间进行的加速度测量的数量。

using UnityEngine;

public class Example : MonoBehaviour { // Check if we got any acceleration measurements during last frame

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