Version: 2023.1

LocationService

class in UnityEngine

切换到手册

描述

Provides methods that allow an application to access the device's location.

变量

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.

公共函数

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