x


Unity iPhone - Changing to Landscape in code

Hi all,

I am making an app where the menu systems are all to be viewed in Portrait mode. On a particular screen it needs to operate in landscape...

I've looked at setting: iPhoneSettings.screenOrientation = iPhoneScreenOrientation.LandscapeRight;

This however, doesn't change the unity player to landscape when I hit play and browse to my horizontal screen.

Also, I need to be able to position things in X and Y normally... at the moment, i'm trying to create my gameObjects and sprites in a rotated manner, so that it gives the appearence of needing to be viewed on the side.. as you can imagine this is very fiddly and ovbiously the long way around this problem.

Any help VERY gratefully receieved.

thanks

Mat

more ▼

asked May 05 '10 at 09:28 PM

Mat Brummitt gravatar image

Mat Brummitt
220 21 23 32

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

iPhoneSettings.screenOrientation doesn't change the orientation in the Unity editor; it only has a visible effect on the device.

more ▼

answered May 05 '10 at 11:26 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

(comments are locked)
10|3000 characters needed characters left

In your game view tab exactly under the tab is a dropdown list of orientations you can choose from to change the view in the editor. It has no effect on the build however you would have to set iPhoneSettings.screenOrientation as Eric5h5 said.

more ▼

answered Sep 14 '10 at 05:58 PM

MSylvia gravatar image

MSylvia
181 3 5 13

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2000
x535
x486
x124

asked: May 05 '10 at 09:28 PM

Seen: 4482 times

Last Updated: May 05 '10 at 09:28 PM