Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LocationService

Provides methods that allow an application to access the device's location.
Read time 1 minuteLast updated 5 days ago

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.