- Home /
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?
Answer by loopyllama · Mar 17, 2011 at 06:12 AM
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; }
Answer by Lab013 · Mar 17, 2011 at 03:46 AM
Read the accelerometer and rotate when you want to.
But where do you set it? You used to set it with iPhoneSettings.screenOrientation.