How to reproduce:
- Open orientations project, which link is in the comments
- When selected platform is Android, make sure that x86 and x86-64 Target Architectures are enabled
- Go to Player Settings -> Resolution and Presentation
- Make sure that Orientation is set to Autorotation and all orientations are enabled
- In Orientations.cs script comment this line Screen.orientation = ScreenOrientation.Portrait; which is called from Start()
- Build and run on Chrome OS device, which is in Tablet mode
- Via device settings Lock the autorotation and try rotating the app
Actual result: App rotates to all orientations
Expected result: because autorotation is locked natively, Unity app shouldn't rotate to all orientations. Let's say if app has Horizontaly locked orienattions, it should allow LandscapeLeft and LandscapeRight, but not Portrait orienattions.
Tested and reproduced:
Google Pixelbook, ChromeOS version: 102.0.5005.75, Android version 11 Build number: R102-14695.85.0
Lenovo Chromebook Duet 2 in 1, ChromeOS version: 103.0.5060.64 (32 bit), Android version 9 Build number: R103-14816.82.0
On Android devices it works as expected