기술 자료

Unity Engine

Unity Engine

enabled

Sets or retrieves the enabled status of this gyroscope.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.InputLegacyModule
public bool enabled { get; set; }

Examples

using UnityEngine;public class Example : MonoBehaviour{ bool enableTilt; void OnGUI() { if (Input.gyro.enabled) { GUILayout.Toggle(enableTilt, "Enable tilt control"); } // Other GUI elements... }}