Unity3D application always launches with same orientation on Android, regardless of OS orientation

698 views Asked by At

When I launches app, it always has same orientation.

After some seconds, maybe in splash scene, it turns to OS orientation.

I got that the orientation always 'Landscape Left' even if device was 'Landscape Right'.

That is my problem.

I expect that app launches so that it matches the orientation of os.

Not portrait or landscape problem, but 'Landscape Left' or 'Landscape Right' problem ;(

PlayerSettings like as bellow.

http://answers.unity3d.com/storage/temp/48453-orientation.png

I set 'Auto Rotation' and checked 'Landscape Right' and 'Landscape Left'.

http://answers.unity3d.com/storage/temp/48455-minsdk.png

And I also set min SDK api level 14.

I set screenOrientation="landscape" in AndroidManifest.xml

<activity android:name="myMainActivity" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:icon="@drawable/app_icon" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape" android:launchMode="singleTop">

Im using Unity3d 4.6.6p1

Thanks ;)

1

There are 1 answers

1
Salvador Lemus On

You can use this to control the orientation in the device via Code Screen.orientation.

You only need to ask wich are the current orientation and channge it to the other if you need it.

Hope It'll be helpfull to you.