ドキュメント

Unity Engine

Unity Engine

batteryStatus

Returns the current status of the device's battery (Read Only).
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static BatteryStatus batteryStatus { get; }

Remarks

See the BatteryStatus enumeration for possible values.
The battery status includes information about whether the device is plugged in to a power source and whether the battery is charging. If battery status is not available on your target platform, this property returns BatteryStatus.Unknown.
Additional Resources: SystemInfo.batteryLevel.