Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.42k stars 306 forks source link

FIX: ISXB-766, ISXB-808, ISXB-704 scroll wheel factor bugs #1940

Closed benoitalain closed 3 months ago

benoitalain commented 3 months ago

Description

Fixes ISXB-766, ISXB-808, ISXB-704, conditionally to trunk PR landing beforehand.

Details of what was changed and the thought process can be found in this Google Document: https://docs.google.com/document/d/1XCC6GqaWzKf1M1jm-UmKRn6sIlmvF7rvF1C8Ws5Yxa4/edit?usp=sharing

Changes made

Please write down a short description of what changes were made.

Notes

Please write down any additional notes, remove the section if not applicable.

Checklist

Before review:

During merge:

unity-cla-assistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

Pauliusd01 commented 3 months ago

Getting these errors when opening the main test repo (open the main repo as a unity project):

Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(287,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'allowPlatformSpecificInputForScrollWheelDelta'
Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(288,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'allowPlatformSpecificInputForScrollWheelDelta'
Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(297,44): error CS0117: 'NativeInputSystem' does not contain a definition for 'GetScrollWheelDeltaPerTick'
Packages\com.unity.inputsystem\InputSystem\Plugins\UI\InputSystemUIInputModule.cs(2076,48): error CS0103: The name 'scrollWheelDeltaPerTick' does not exist in the current context
benoitalain commented 3 months ago

Getting these errors when opening the main test repo (open the main repo as a unity project):

Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(287,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'allowPlatformSpecificInputForScrollWheelDelta'
Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(288,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'allowPlatformSpecificInputForScrollWheelDelta'
Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(297,44): error CS0117: 'NativeInputSystem' does not contain a definition for 'GetScrollWheelDeltaPerTick'
Packages\com.unity.inputsystem\InputSystem\Plugins\UI\InputSystemUIInputModule.cs(2076,48): error CS0103: The name 'scrollWheelDeltaPerTick' does not exist in the current context

Indeed. You need to use the trunk branch uitech/bugfix/isxb-776-fix-scrollwheelfactoruniformity to make it compile. Once the trunk PR lands, this one should be easier to test.

Pauliusd01 commented 3 months ago

Getting these errors when opening the main test repo (open the main repo as a unity project):

Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(287,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'allowPlatformSpecificInputForScrollWheelDelta'
Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(288,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'allowPlatformSpecificInputForScrollWheelDelta'
Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(297,44): error CS0117: 'NativeInputSystem' does not contain a definition for 'GetScrollWheelDeltaPerTick'
Packages\com.unity.inputsystem\InputSystem\Plugins\UI\InputSystemUIInputModule.cs(2076,48): error CS0103: The name 'scrollWheelDeltaPerTick' does not exist in the current context

Indeed. You need to use the trunk branch uitech/bugfix/isxb-776-fix-scrollwheelfactoruniformity to make it compile. Once the trunk PR lands, this one should be easier to test.

Ah my bad, kinda throws CI off too then. Should this be delayed until trunk PR + backports merge?

benoitalain commented 3 months ago

Getting these errors when opening the main test repo (open the main repo as a unity project):

Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(287,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'allowPlatformSpecificInputForScrollWheelDelta'
Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(288,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'allowPlatformSpecificInputForScrollWheelDelta'
Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(297,44): error CS0117: 'NativeInputSystem' does not contain a definition for 'GetScrollWheelDeltaPerTick'
Packages\com.unity.inputsystem\InputSystem\Plugins\UI\InputSystemUIInputModule.cs(2076,48): error CS0103: The name 'scrollWheelDeltaPerTick' does not exist in the current context

Indeed. You need to use the trunk branch uitech/bugfix/isxb-776-fix-scrollwheelfactoruniformity to make it compile. Once the trunk PR lands, this one should be easier to test.

Ah my bad, kinda throws CI off too then. Should this be delayed until trunk PR + backports merge?

We can wait for trunk PR to merge, but the trunk PR is only useful as a support for this one, so if this one doesn't do what we want then we'll need to land more changes to trunk and iterate like that. It might be useful to quickly confirm that both PRs together yield the expected results, so we know we're pushing the right thing to trunk.

You can definitely wait until the trunk PR is fully reviewed and approved, though.

Pauliusd01 commented 3 months ago

Still seeing these errors when opening it with the correct Editor (project does not matter): Packages\com.unity.inputsystem\InputSystem\NativeInputRuntime.cs(287,38): error CS0117: 'NativeInputSystem' does not contain a definition for 'normalizeScrollWheelDelta' Editor used:

Unity 6 Preview
6000.0.3f1.6088.uitech/bugfix/isxb-776-fix-scrollwheelfactoruniformity.2
Revision: uitech/bugfix/isxb-776-fix-scrollwheelfactoruniformity 49158e0bb68d
Built: Thu, 23 May 2024 17:49:35 GMT
benoitalain commented 3 months ago

49158e0bb68d

Indeed, I just pushed a new commit on the trunk PR (and one on the package PR to go with it). You now need 5f81a20dcb6835c956b03762e95e013d9dd9e30d for your Editor.

benoitalain commented 3 months ago

Closing this PR in favor of https://github.com/Unity-Technologies/InputSystem/pull/1946 and https://github.cds.internal.unity3d.com/unity/neutron/pull/7629