-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UUM-91484] UnityProject example: set theme for unity game activity to make it fullscreen on 6.1 #117
[UUM-91484] UnityProject example: set theme for unity game activity to make it fullscreen on 6.1 #117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to expand our UAAL test here - https://github.cds.internal.unity3d.com/unity/unity/blob/trunk/Tests/Unity.IntegrationTests/Android/AndroidUAAL.cs, by injecting touch event and see that it's being received at the expected position. Since currently we don't validate that, and that's how this bug creeped in.
Anyways, this is optional, I made a memo for myself, unless you want to do it.
Thanks for finding the cause for this issue!
@@ -30,6 +30,7 @@ | |||
android:name=".MainUnityGameActivity" | |||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" | |||
android:hardwareAccelerated="false" | |||
android:theme="@style/AppTheme.NoActionBar" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to match Unity themes here. See https://github.cds.internal.unity3d.com/unity/unity/blob/trunk/PlatformDependent/AndroidPlayer/Resources/UnityManifest.xml
Could you set
android:theme="@style/UnityThemeSelector"
for Activity
and
android:theme="@style/BaseUnityGameActivityTheme"
for GameActivity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense!
Done
note: android support starts with 2023.1.7f1, for which the used theme is available
Hi (and thanks for the review!) I probably will not have time to do that before the holidays (aka in the next 2h), but I could take a look next year |
It's up to Lukas to fix - https://jira.unity3d.com/browse/ANT-2623 you can poke him if you want |
Description
Jira link: UUM-91484
On Unity 6.1, the UnityGameActivity example is broken because of the action bar, which shifts all of the input coordinates by the height of the bar. See attached video on UUM-91483
This PR forces the UnityGameActivity from the example to be fullscreen even on Unity 6.1. This is done by using the NoActionBar theme in the Android manifest.