juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.14k stars 522 forks source link

App Re-Entry - UnityPlayer wont load in FlutterUnityPlugin #194

Closed djogicmensur closed 4 years ago

djogicmensur commented 4 years ago

On Huawei phones (p30 and p30 pro) unity is run only first time when app is build. When re-launching the app Flutter Unity View is created, but unity is not loading. Not even unity splash logo is shown. This could be on other brands to, but so far i have reported only Huawei. Other major brands work just fine.

I tried FlutterUnityView.java with and without commented "UnityUtils.getPlayer().quit();" on dispose method but no luck. Same issue every time.

Also, when i move UnityPlayer to other activity or background service like casting it works, when its back in FlutterUnityVIew id does not work. Only black screen.

Any suggestions on this, did i missed something or its general issue for this plugin ?

juicycleff commented 4 years ago

@djogicmensur little patience and the new improved version will be out

djogicmensur commented 4 years ago

@djogicmensur little patience and the new improved version will be out

Thats great. Thanks

juicycleff commented 4 years ago

@djogicmensur please you can test it now :)

WouterVandenputte commented 3 years ago

I some sort of way, I have the same problem. But in another way, I have the opposite problem.

The app launches perfectly with everything in place EXCEPT for the UNITY view. It is not displayed, no splash screen. When I minimize the app and then launch it, I then see the unity view. So in my case its the opposite (don't see it on first launch, only see it on reopening).

And I too have this problem on a Huawei. When I test this on my Samsung tablet, the plugin works just fine... I am using the latest plugin as to this date (06/05/2021). Did you manage to fix your problem?