Is is possible for Unity 3D smartphone app to support multiple orientations

Is is possible to create a smartphone (iOS and/or Android) app with Unity that supports both landscape and portrait orientations? By support I mean that the app gets notified that the orientation has changed and can adjust layout accordingly.

For example, with the Monkey Island iOS games you play the game in landscape and when you put the game into portrait it displays a menu. Would something like that be possible in Unity?

more ▼

asked Jun 01, 2011 at 08:07 AM

avatar image

66 10 10 13

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

1 answer: sort voted first


Check Devise Orientation in the documentation. You can continuously check how the device is oriented and change your game accordingly.

more ▼

answered Jun 01, 2011 at 04:12 PM

avatar image

3.3k 77 66 114

Wouldn't continually checking device orientation be bad for performance? Is there a way to get notifications that the orientation has changed?

Jun 02, 2011 at 02:27 AM thomasw

@thomasw: there are no notifications. You can just check Input.deviceOrientation a few times per second; it won't have any effect at all on performance.

Jun 02, 2011 at 02:47 AM Eric5h5
(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



Answers and Comments



asked: Jun 01, 2011 at 08:07 AM

Seen: 2343 times

Last Updated: Jun 02, 2011 at 02:47 AM