AutoRotation is set up in Unity’s playersettngs, and landscape left and landscape right are checked. The desired result is that after running the game, the screen will always be horizontal, and the left and right horizontal screens will automatically flip according to the phone. However, the result of running on the iPhone is that It has to do with whether the phone itself locks the vertical screen.
When the vertical screen is locked, the game can automatically flip once each time it gains focus, and then cannot flip automatically again. When the vertical screen is turned off, the game can automatically flip normally.
This situation is the same on the Android system, but the Android system can achieve automatic flipping when the vertical screen is locked by forcibly calling the activity’s setRequestedOrientation every frame.
But ios was not found. I searched for the oc code in the exported xcode project, modified EnabledAutorotationInterfaceOrientations and other codes that may be related to screen rotation, but still had no effect.
unity2022.3.13f1,unity2023.2.3f1
no one has the same problom?