Gyroscope.enabled

public bool enabled;

Description

Sets or retrieves the enabled status of this gyroscope.

using UnityEngine;

public class Example : MonoBehaviour { bool enableTilt;

void OnGUI() { if (Input.gyro.enabled) { GUILayout.Toggle(enableTilt, "Enable tilt control"); }

// Other GUI elements... } }

Did you find this page useful? Please give it a rating: