Closed todi1856 closed 2 months ago
Added @IGuscin to help since I don't have access to a folding phone. Also, I see there's some CI failures with it (you can ignore the tvOS ones though)
Hey @ekcoh , any ideas what to do about this one https://unity-ci.cds.internal.unity3d.com/job/40124614?utm_source=github ?
Should I bump minor version ?
@todi1856 Yes version should be bumped (minor) on the branch/PR like this that requires it to change.
@IGuscin @todi1856 Maybe this indicates that there is need to know device dependent resolution of the sensor value? Maybe we should state in the sensor API docs that the resolution of the sensor value is device/implementation dependent at least?
@IGuscin @todi1856 Maybe this indicates that there is need to know device dependent resolution of the sensor value? Maybe we should state in the sensor API docs that the resolution of the sensor value is device/implementation dependent at least?
I expanded the sample to show to get sensor resolution - https://github.com/Unity-Technologies/InputSystem/pull/1979/commits/510c6a1cc52c27b6580e6ed9a37b2490d133c1a2
Description
Add AndroidHingeAngle sensor, which basically tells how much Android device is unfolded with values ranging from 0 to 180.
Note: There's no foldable Apple phones currently, thus this change is for Android only.
See foldable phone here - https://media.wired.com/photos/6453efc6daed59ebbf4608a7/master/pass/Google-Pixel-Fold-News-Gear.jpg
This change contributes to Unity better supporting large screen & foldable Android devices, as part of contractual obligation with Google - https://jira.unity3d.com/browse/PLAT-9014
Child ticket for tracking https://jira.unity3d.com/browse/PLAT-10298
The change is pretty isolated and doesn't require any change on Android platform backend, since backend always reports both existing and future sensors. So only C# side on input system package was missing.
Changes made
Added public AndroidHingeAngle class, which user can use to access hinge angle sensor and thus get data how much phone is folded.
Testing
Risk
Very low risk, since change is isolated
Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: