docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Location settings

    Use the location settings to set the accuracy of location readings from the LocationSensor device, and how often the sensor reports new readings.

    Property Description
    Location Accuracy The accuracy you want location readings to have, in meters. The default is 10 meters. Smaller values increase power use. Note that the accuracy a device provides depends on its hardware and platform.
    Location Distance Threshold The minimum distance, in meters, the device must move before the location sensor reports a new reading. The default is 10 meters. A larger value reports readings less often, which can lower power use.

    Both settings accept values of 0 or greater. The Input System treats negative values as 0.

    Change location settings at runtime

    To use different values at runtime, call LocationSensor.Configure.

    To reset to the default values, call LocationSensor.ResetConfiguration.

    If the location sensor is enabled when you change its configuration, readings might pause briefly while the new values apply. If the sensor is disabled, the new values apply when you enable it.

    Additional resources

    • Query sensors in code
    • Supported sensors reference
    • Create a settings asset
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)