コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】モバイルで画面の向きを変更する方法

概要

Screen.orientation = ScreenOrientation.LandscapeLeft;

Screen.orientation を変更することでモバイルで画面の向きを変更できます

列挙型 向き
Portrait f:id:baba_s:20190916175820p:plain
LandscapeLeft f:id:baba_s:20190916175828p:plain
LandscapeRight f:id:baba_s:20190916175835p:plain