There are questions around here about how to check what orientation is currently in effect, but I’m having trouble controlling the orientation.
In my case, my app is doing funny things by rotating in all portrait and landscape modes when the device is turned. In the XCode build, I’ve been going through AppController .mm and tweaking multiple settings around portrait mode. Nothing has worked to limit the app to landscape modes only.
How can I limit my app to landscape modes only?
This behavior happens when I add my own SDK to the app. Without my SDK, the app only respects landscape modes.
I would have thought that changing code at the AppController. mm level would be the end-all, even despite settings in my SDK. I’m asking here, now, to understand why I can’t override the orientation settings in code. Ideas?
P.S. Scripting it in as you suggested in option #2 does not affect landscape mode. This leads me to believe that somehow, execution of settings is first based on Unity settings/scripts and THEN overwritten by SDKs used.
– hyliandannyOf course changing the setting via scripting will only allow you to change the settings when the first frame is executed. Before that only the presentation settings are valid. It seems you dig quite deep into native code, good luck ;)
– Bunny83Hilarity ensues when I click on your "let me google that for you" link, and it repeats the same google search that brought me to this very page.
– levis501