文档

Unity Engine

Unity Engine

LocationService

Provides methods that allow an application to access the device's location.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Class
  • Namespace: UnityEngine
  • Assembly: UnityEngine.InputLegacyModule
public class LocationService

Properties

Property

Description

isEnabledByUserIndicates whether the device allows the application to access the location service.
lastDataThe last geographical location that the device registered.
statusReturns the location service status.

Methods

Method

Description

StartStarts location service updates.
StopStops location service updates. This is useful to save battery power when the application doesn't require the location service.