- Home /
Set Screen Size To Only Be Wide?
Hello sorry if this is in the wrong place, if it is please remove it. Anyways my question is can I set the screen to be only playable when you turn your ipod/ipad horizontally? I've seen many games like that in the past, and I was wondering if Unity or Xcode can do that. The reason why I ask is because I've seen lot's of tutorials of games made with Unity, but all of them have been played vertically and not horizontally. I only want my game to be played horizontally for certain reasons. Anyways thanks for reading.
Answer by alebasco · Aug 21, 2014 at 01:37 AM
Yes you can!
http://docs.unity3d.com/ScriptReference/ScreenOrientation.html
That should provide you with everything you need!
Thank you. I'll accept your answer later if I can get it to work or if I understand it correctly. Thanks again.
Okay quick question for you or anyone, can't I just set the screen orientation in the Player Settings before I build my game? Wouldn't that be easier? Or does it not affect whether people can flip it vertical or horizontal?
Well I found this piece of code on the Unity site, will this keep it from being vertical? Also do I have to have this script in every scene? Please help:
void Start () {
Screen.orientation = ScreenOrientation.LandscapeLeft;
}