Search Issue Tracker

Fixed

Fixed in 2020.3.38f1, 2021.3.7f1, 2022.1.12f1, 2022.2.0b3, 2023.1.0a3

Votes

2

Found in

2019.4.39f1

2020.3.31f1

2021.3.3f1

2022.1.0a8

2022.2.0a8

2022.2.0a13

2023.1.0a1

Issue ID

UUM-515

Regression

No

[Android] Screen.safeArea returns wrong height when building Native app with Unity as a Library

--

-

How to reproduce:
1. Download the attached project 'UaaL.zip'
2. Open the 'NativeAndroidApp' folder with AndroidStudio (keep 'UnityProject' and 'NativeAndroidApp' in the same folder)
3. Run the project on an Android device
4. When the app loads, press 'SHOW UNITY'
5. Observe the resolution values that are printed on rotating cube

Expected result: The height of Screen.safeArea is smaller than the real height of the screen (height is 2190 when the screen is 1080x2280)
Actual result: The height of Screen.safeArea is the same as the real height of the screen (height is 2280 when the screen is 1080x2280)

Reproducible with: 2019.4.36f1, 2020.3.31f1, 2021.2.16f1, 2022.1.0b12, 2022.2.0a8

Reproducible with:
N/A, Huawei - (NOH-NX9), Android 10, CPU: NOT FOUND, GPU: Mali-G78
VLNQA00316, Samsung Galaxy Note10 (SM-N970F), Android 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76

Could not test with (no cut-out cameras on display):
VLNQA00001, Google Pixel 2 (Pixel 2), Android 11, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00225, Qualcomm null (SDM845 for arm64), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00288, Samsung Galaxy J7 (SM-J730F), Android 8.1.0, CPU: Exynos 7 Octa 7870, GPU: Mali-T830
N/A, Samsung Galaxy S10 (SM-G975F), Android 10, CPU: Exynos 9820 (ARMv8), GPU: Mali-G76
iPhone 11 (iOS 13.5)

Note:
- The issue can be reproduced only on devices with cameras that take screen space (like hole-punch cameras)
- Does not reproduce when using UaaL on iOS
- Does not reproduce when building to device from Unity or from exported project (which is not used as a library)

Comments (1)

  1. Riolab

    Jul 04, 2023 16:30

    No funciona en 2022.3.4f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.