Unity-Technologies / uaal-example

Other
733 stars 233 forks source link

Fix incorrect measurement of Screen.safeArea in NativeAndroidApp #66

Closed uzzu closed 1 month ago

uzzu commented 2 years ago

The NativeAndroidApp sample is missing a file which defines unitySurfaceView id resource, compared to the Android Gradle Project exported for a regular Unity Android app. That causes incorrect measurement of Screen.safeArea on Unity for NativeAndroidApp.

This PR fixes that issue.

Here are some screenshots by Pixel 5a.

before Screenshot_20220618-202615

after Screenshot_20220618-202536

As a supplement, an area rendered in gray color in this screenshot is image which have been stretched and rendered to full screen size in Unity, so rendering size has not been reduced.

uzzu commented 2 years ago

@emandravickas Hi. Could you please review this PR?