# LocationService

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

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.InputLegacyModule

```csharp
public class LocationService
```

## Properties

| Property                                                                                          | Description                                                                         |
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [isEnabledByUser](/engine/6000.0/script-reference/unityengine/locationservice/isenabledbyuser.md) | Indicates whether the device allows the application to access the location service. |
| [lastData](/engine/6000.0/script-reference/unityengine/locationservice/lastdata.md)               | The last geographical location that the device registered.                          |
| [status](/engine/6000.0/script-reference/unityengine/locationservice/status.md)                   | Returns the location service status.                                                |

## Methods

| Method                                                                        | Description                                                                                                                     |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [Start](/engine/6000.0/script-reference/unityengine/locationservice/start.md) | Starts location service updates.                                                                                                |
| [Stop](/engine/6000.0/script-reference/unityengine/locationservice/stop.md)   | Stops location service updates. This is useful to save battery power when the application doesn't require the location service. |
