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.09k stars 504 forks source link

Getting black screen on android while loading unity in some devices #945

Closed ajavjari closed 2 months ago

ajavjari commented 2 months ago

https://github.com/juicycleff/flutter-unity-view-widget/assets/58842000/3fe58903-d3d6-42c9-afaa-c0f041e26af6

When I try to load unity in some devices I'm getting black screen but audio is being played in the background. When I go back and open it again, after that I'm able to see the unity part. I have attached the screen recording. As far as I have noticed that, this issue is occurring in the android version 13 or later. In the android version 12 or before it is working as expected.

I have used 2022.2.0 fuw package for integration

timbotimbo commented 2 months ago

Are you using flutter 3.19?

It looks like a variation of this 3.19 bug.

Try the workarounds mentioned in that issue (flutter <3.19 or useAndroidViewSurface:true).

ajavjari commented 2 months ago

@timbotimbo Yes it worked using useAndroidViewSurface:true As well rotation issue also solved with this. Thanks