x


How to check for iPhone orientation at start-up and load game accordingly?

I have a game that's designed in landscape-mode, and the Unity Editor's player settings have the Default Orientation set to Landscape Left. Apple rejected the app, stating that it had to be playable in at least both landscape modes.

So is there a way to load the app in Landscape Left mode if iPhoneInput.orientation == iPhoneOrientation.LandscapeLeft and load in Landscape Right mode if iPhoneInput.orientation == iPhoneOrientation.LandscapeRight?

It would be even better if the game could dynamically switch, but I think simply determining the orientation upon loading should be enough.

more ▼

asked Apr 05 '10 at 10:47 PM

user-1966 (google) gravatar image

user-1966 (google)
41 2 2 6

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

1 answer: sort voted first

Use iPhoneSettings.screenOrientation to set the Unity player and iPhoneInput.orientation to read from the user's hardware.

more ▼

answered Apr 05 '10 at 11:41 PM

Design3.com gravatar image

Design3.com
640 1 1 10

(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
x124

asked: Apr 05 '10 at 10:47 PM

Seen: 2568 times

Last Updated: Apr 05 '10 at 10:47 PM