Skip to content

Commit b731208

Browse files
author
Ivan
committed
Fix app getting stuck in splash screen on S21
1 parent 2a87c10 commit b731208

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

android/src/main/kotlin/com/xraph/plugin/flutter_unity_widget/FlutterUnityWidgetController.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ class FlutterUnityWidgetController(
6868

6969
if(UnityPlayerUtils.unityPlayer == null) {
7070
createPlayer()
71-
refocusUnity()
71+
// Commented out to:
72+
// - Fix possible 4 second delay caused by pausing Unity while in the Android splash screen.
73+
// This could also be seen in logcat as "Timeout while trying to pause the Unity Engine."
74+
// - Fix ANR caused by interacting with app during splash screen while Unity is waiting to pause itself
75+
//refocusUnity()
7276
} else if(!UnityPlayerUtils.unityLoaded) {
7377
createPlayer()
7478
attachToView()

0 commit comments

Comments
 (0)