NEW: Add LocationSensor for Input System - #2469
Open
MorganHoarau wants to merge 13 commits into
Open
Conversation
MorganHoarau
commented
Aug 11, 2026
…om/Unity-Technologies/InputSystem into im-parity/isx-2227-location-sensor
MorganHoarau
marked this pull request as ready for review
August 11, 2026 15:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Addresses ISX-2227 is part of the Input Manager parity epic ISX-2108.
This PR is the managed layer only. Refer to the native bridge PR here.
Add a
LocationSensordevice that exposes the device's GPS and lifecycle through the standard Input System surface:latitude,longitude,altitude,horizontalAccuracy,verticalAccuracy,timestamp.InputSystem.EnableDevice/DisableDevice+statusandisEnabledByUseras query properties.Configure(desiredAccuracyInMeters, updateDistanceInMeters)+ResetConfiguration(), with project defaultsInputSettings.locationAccuracy/locationDistanceThreshold(both 10, matching legacyStart()), surfaced in Project Settings.Backed by the shared native
LocationService.Class diagram: LocationSensor and command surface
classDiagram class Sensor class LocationSensor { +AxisControl latitude +AxisControl longitude +AxisControl altitude +AxisControl horizontalAccuracy +AxisControl verticalAccuracy +DoubleControl timestamp +LocationServiceStatus status +bool isEnabledByUser +static LocationSensor current +Configure(float, float) +ResetConfiguration() } class LocationState { <<internal, IInputStateTypeInfo>> +double timestamp +float latitude +float longitude +float altitude +float horizontalAccuracy +float verticalAccuracy } class InputSettings { +float locationAccuracy +float locationDistanceThreshold } class QueryLocationStatusCommand class QueryLocationEnabledByUserCommand class ConfigureLocationCommand Sensor <|-- LocationSensor LocationSensor ..> LocationState : stateType LocationSensor ..> QueryLocationStatusCommand : status (LSTA) LocationSensor ..> QueryLocationEnabledByUserCommand : isEnabledByUser (LUSR) LocationSensor ..> ConfigureLocationCommand : Configure (LCFG) LocationSensor ..> InputSettings : ResetConfiguration reads defaultsDocumentation Impact
LocationSensor+ controls +status/isEnabledByUser/Configure/ResetConfiguration,InputSettings.locationAccuracy/locationDistanceThreshold, threepubliccommand structs). All carry XML docs.Documentation~/corresponding-old-new-api.mdnow mapsInput.location->LocationSensorwith a usage snippet.Testing status & QA
Please describe the testing already done by you and what testing you request/recommend QA to execute. If you used or created any testing project please link them here too for QA.
ℹ️ PLEASE READ: Parity testing summary document
CoreTests_Devices.cs): reading,status,isEnabledByUser, fallback path (no native impl),Configure,ResetConfiguration.Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Stopped/falsewhere no native impl exists (editor/desktop), so no regression to existing sensors.InputSettings(two new serialized fields + settings UI).Comments to reviewers
Please describe any additional information such as what to focus on, or historical info for the reviewers.
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.