Unity3D/Android

[버그] Android 12(API 31) 미만(예상)에서 FullScreen 안되는 이슈

blueasa 2022. 12. 13. 18:58

Unity 2021.3.14f1

----

 

Android 12 미만(예: Android 9에서 확인됨)에서 갑자기 FullScreen(전체화면)이 안되는 이슈가 생겨서 처리하고 올려 둠.

 

예상으로는 Android 12(API 31) 대응이후 Android 12 미만 디바이스에서 생기는 것 같다.

확인된 걸로는 Android 9에서 아래와 같이 '이 앱은 전체 화면에서는 정상적으로 작동하지 않을 수 있습니다.' 라고 뜬다.

Android 9 설정 화면

 

위 설정이 꺼져있을 때 Android 12미만에서 대충 아래와 같은 느낌으로 뜬다.

FullScreen 꺼져있을 때 참조 이미지

[참조이미지 링크] https://answers.unity.com/questions/1577161/game-not-expanding-to-fill-full-screen-on-s8-andro.html

 

수동으로 '활성화'하면 정상적으로 전체화면으로 보이기는 한데, 처음부터 정상적으로 보여야 될 것 같아서 알아보고 수정해둠.

 

[결론]

수정방법은 의외로 심플하다.

아래 코드를 앱 최초 실행 시 어딘가에 추가해 두자.

Screen.fullScreen = true;

 

밥아저씨 : "참 쉽죠~?"

 

 

[참조] https://forum.unity.com/threads/disable-immersivemode-unity5.313911/#post-3090959

 

Disable ImmersiveMode (Unity5)

Is there a way to disable the immersive mode in Unity 5? It's a cool feature, but IMHO it's not right to presume that this settings is appropriated to...

forum.unity.com

 

[추가]

아래 링크를 보면 android:theme를 써서 전체화면을 만드는 것 같은데 나중에 이것도 테스트 해봐야 될 것 같다.

android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"

 

[참조2] https://gamedev.stackexchange.com/questions/166667/why-do-i-have-to-set-my-unity-app-to-full-screen-manually-on-my-phone

 

Why do I have to set my Unity app to full-screen manually on my phone

When I open my unity app it doesn't go full-screen until I change it in the settings, isn't there a way to do that... it actually isn't a scaling problem or an aspect ratio.... Because you can see ...

gamedev.stackexchange.com

 

[참조3] https://202psj.tistory.com/1342

 

[Unity] 유니티 소프트키 관련

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 출처: https://m.blog.naver.com/PostView.nhn?blogId=uponsky&logNo=220334847464&proxyRefe

202psj.tistory.com

 

반응형