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, 2011 at 08:07 AM

thomasw gravatar image

thomasw
66 10 10 13

(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, 2011 at 04:12 PM

Anxo gravatar image

Anxo
2.2k 73 63 102

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

By RSS:

Answers

Answers and Comments

Topics:

x4845
x2885
x203
x59
x25

asked: Jun 01, 2011 at 08:07 AM

Seen: 2266 times

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