Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ however, it has to be formatted properly to pass verification tests.

### Changed
- Replaced "Look" rebinding button for "Keyboard" control scheme with a mouse sensitivity slider in `RebindingUISample` to illustrate how to support customizing scaling of mouse deltas and how to reapply the persisted setting between runs.
- Changed: Input System no longer depends the obsolete com.unity.modules.vr package.

### Added
- Added an example of how to swap two similar controls to the `RebindingUISample`. This is accessible via a button with two arrows at the right hand-side of the screen. Pressing the button allows swapping the current bindings of the "Move" and "Look" gamepad bindings via the new `RebindActionUI.SwapBinding(RebindActionUI other)` method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,16 +418,6 @@ protected void Reset()
/// </summary>
protected virtual void Awake()
{
#if UNITY_INPUT_SYSTEM_ENABLE_VR && ENABLE_VR
if (HasStereoCamera(out var cameraComponent))
{
// The Unity 6.4+ replacement for this call has to be figured later
// See https://jira.unity3d.com/browse/XR-7591
#pragma warning disable CS0618
UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking(cameraComponent, true);
#pragma warning restore CS0618
}
#endif
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Can we remove the now empty Awake and OnDestroy as well? Thanks

Copy link
Collaborator

@chris-massie chris-massie Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because they are protected virtual and users may have created derived scripts that use them. It would be a breaking change to remove the methods.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had tried to remove the methods and it got caught against CI. Unfortunately, we have to leave in the empty methods for now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought those Awake/Start/etc were the MonoBehaviour magic methods that are invoked by name from the native code if present, it didn't matter whether they were public, private, virtual or not. But ok, let it be for now.


/// <summary>
Expand Down Expand Up @@ -459,16 +449,6 @@ protected void OnDisable()
/// </summary>
protected virtual void OnDestroy()
{
#if UNITY_INPUT_SYSTEM_ENABLE_VR && ENABLE_VR
if (HasStereoCamera(out var cameraComponent))
{
// The Unity 6.4+ replacement for this call has to be figured later
// See https://jira.unity3d.com/browse/XR-7591
#pragma warning disable CS0618
UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking(cameraComponent, false);
#pragma warning restore CS0618
}
#endif
}

/// <summary>
Expand Down Expand Up @@ -630,11 +610,6 @@ protected virtual void SetLocalTransform(Vector3 newPosition, Quaternion newRota
}
}

bool HasStereoCamera(out Camera cameraComponent)
{
return TryGetComponent(out cameraComponent) && cameraComponent.stereoEnabled;
}

// Evaluates whether the given action has at least one resolved control and may generate input.
private static bool HasResolvedControl(InputAction action)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
"expression": "2.0.3",
"define": "DISABLE_BUILTIN_INPUT_SYSTEM_WINDOWSMR"
},
{
"name": "com.unity.modules.vr",
"expression": "1.0.0",
"define": "UNITY_INPUT_SYSTEM_ENABLE_VR"
},
{
"name": "com.unity.modules.xr",
"expression": "1.0.0",
Expand Down
1 change: 0 additions & 1 deletion Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
Expand Down
1 change: 0 additions & 1 deletion Tools/CodeAnalyzerTestProject/Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
Expand Down