- Home /
Setting Android orientation without a manifest??
Hi all,
I'm trying to build an APK file for internal release. The app is supposed to run in landscape mode, so I specified Landscape Left in Unity. But I'm not uploading this app to Google Play or anything like that, just making a .apk file.
And the app runs in Portrait rather than Landscape...
Is this the expected behavior? Can I set Screen.orientation to landscape in code instead, or something like that?
Answer by Yury-Habets · Nov 04, 2014 at 07:36 AM
You can set the Orientation in your scripts: http://docs.unity3d.com/Manual/AndroidMobileAdvanced.html
You can control screen orientation by setting Screen.orientation to one of those, or to ScreenOrientation.AutoRotation
If you set Landscape Left in the Player Settings, this gets applied to the manifest, and should work on the device. You can override it in the scripts.
Your answer
Follow this Question
Related Questions
Android camera change based on orientation. 1 Answer
Prevent orientation change by external application in Android 0 Answers
Detect Orientation change at runtime? 0 Answers
Hey I would like to learn via script how to change automatically the screen orientation 1 Answer
How to make Unity Player respect Android system settings 2 Answers