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 505 forks source link

iPhone Screen Transition Issue Depending on Unity Version #872

Open ekdrnqkdrn opened 10 months ago

ekdrnqkdrn commented 10 months ago
  1. Put your iPhone down on your desk.
  2. Do not pick up your phone in that state, but run Flutter and try switching screens.
  3. Unity and the project are rotated, but on the iPhone they are in portrait mode. 4.This status will not change until you answer the phone.

If you hold the phone and tilt it slightly, it will operate normally.

Unity (please complete the following information):

Smartphone (please complete the following information):

timbotimbo commented 5 months ago

You mention 2021.3.27f1. I can find these lines in the changelog for Unity 2021.3.28, which looks like rotation was pretty messed up on iOS.

iOS: Fixed "Screen.orientation" is not changing orientation in the UaaL. (UUM-30925)

iOS: Fixed Screen.orientation not changing value when only landscape orientations are enabled and device is rotated. (UUM-36598)

iOS: Fixed Screen.orientation returns wrong values when switching from Landscape orientation to AutoRotation at runtime on iOS 16. (UUM-23251)

If anyone is still running into something like this, try a different (newer) Unity version.