UE 코드를 분석하여 아래와 같이 문제를 확인 하였습니다.
GameActivity.java.template 코드 내에 Android System UI를 표시 할 지 여부를 관리하기 위해서 정의된 ShouldHideUI 값이 초기에 정상적으로 설정되었다가 잘못된 값으로 변경되는 문제를 발견했습니다.
ShouldHideUI = bundle.getBoolean(“com.epicgames.unreal.GameActivity.bShouldHideUI”);
https://github.com/EpicGames/UnrealEngine/blob/5\.6/Engine/Build/Android/Java/src/com/epicgames/unreal/GameActivity.java.template\#L3888
ShouldHideUI = _extrasBundle.getString(“ShouldHideUI”) != null;
https://github.com/EpicGames/UnrealEngine/blob/5\.6/Engine/Build/Android/Java/src/com/epicgames/unreal/GameActivity.java.template\#L3943
_extrasBundle 에서 값을 정상적으로 String으로 받은 후 해당 값이 존재할 때만 ShouldHideUI 에 값을 넣는 방식으로 수정 후 문제가 해결되었습니다.
Hello,
Is your deep link launching directly into the GameActivity or the SplashActivity? Currently the SplashActivity would populate the extras to match the values specified in the AndroidManifest.
Best regards.
안녕하세요.
실행은 GameActivity 로 진행하고 있습니다. SplashActivity 에서 추가 정보를 입력하는 부분에 대해서는 확인 하였습니다.
다만 제가 의문을 갖는 부분은 코드 자체에 있습니다.
ShouldHideUI = _extrasBundle.getString(“ShouldHideUI”) != null;
https://github.com/EpicGames/UnrealEngine/blob/5.6/Engine/Build/Android/Java/src/com/epicgames/unreal/GameActivity.java.template#L3943
ShouldHideUI 에 할당되는 값은 번들에 “ShouldHideUI” 키가 포함되어 있다면 해당 값이 어떤 값이든 관계없이 항상 true가 되게 됩니다.
반대로 값 “ShouldHideUI” 가 없다면 항상 false로 설정됩니다.
프로젝트 설정에 “[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings] bFullScreen=true” 값이 동작하지 않게 됩니다.
저는 아래와 같이 코드가 수정되어야 한다고 생각합니다.
String hideUIStr = _extrasBundle.getString(“ShouldHideUI”);
if (hideUIStr != null) {
ShouldHideUI = Boolean.parseBoolean(hideUIStr);
}
Hello,
Thanks for confirming your use case. I proposed a similar change to the development team last week.
ShouldHideUI = _extrasBundle.containsKey("ShouldHideUI") ? Boolean.parseBoolean(_extrasBundle.getString("ShouldHideUI")) : ShouldHideUI;
UseDisplayCutout = _extrasBundle.containsKey("UseDisplayCutout") ? Boolean.parseBoolean(_extrasBundle.getString"UseDisplayCutout")) : UseDisplayCutout;
I’ll follow up with a CL# if it gets integrated.
Best regards.