x


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 '11 at 08:07 AM

thomasw gravatar image

thomasw
66 3 3 6

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

1 answer: sort voted first

Yes,

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

more ▼

answered Jun 01 '11 at 04:12 PM

Anxo gravatar image

Anxo
1.9k 27 31 42

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

Jun 02 '11 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 '11 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

By RSS:

Answers

Answers and Comments

Topics:

x3956
x2553
x179
x52
x21

asked: Jun 01 '11 at 08:07 AM

Seen: 1917 times

Last Updated: Jun 02 '11 at 02:47 AM