包含此页的版本:
不含此页的版本:
设置或检索该陀螺仪的启用状态。
using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { public bool enableTilt; void OnGUI() { if (Input.gyro.enabled) GUILayout.Toggle(enableTilt, "Enable tilt control"); } }