How do you handle screen rotation in Unity 3.3?

In Unity 3.3, it seems that iPhoneSettings.screenOrientation has been deprecated. How do we actually handle screen rotation now?

3 Answers

3

Screen.orientation

Would you please put that in the context of a full example. It's clear we should be using Screen.orientation from the error message but HOW do we use it now. For instance: // this use to work iPhoneSettings.screenOrientation = iPhoneScreenOrientation.LandscapeRight // this works now (put your example here, please)

// Start in landscape mode function Start () { Screen.orientation = ScreenOrientation.Landscape; }

Read the accelerometer and rotate when you want to.

But where do you set it? You used to set it with iPhoneSettings.screenOrientation.

can anyone help me ? i want to use this in my game.