【Xcode、Unity】アプリの縦横回転(失敗1、成功1)
バージョン
・Unity : 2018.3
・Xcode: 11.1
Xcode側で回転の設定
左サイドバーのプロジェクト名 → "TARGETSのプロジェクト名"→"General"→"Deployment info"→"Device Orientation"
・Portation:縦画面(ホームボタン=下側)
・Upside Down:縦画面(ホームボタン=上側)
・Landscape Left:横画面(ホームボタン=左側)
・Landscape Right:横画面(ホームボタン=右側)
これで動くと思ってました。
回転しない!!!
Unity側で設定さがしてみよ・・・
Unity側で回転の設定
ここでゲーム画面の向きが決めれるようなので
Player Settings → Resolution and Presentation → Default Orientation
Auto Rotationに変更して回転してほしい向きをチェック
参考:
https://docs.unity3d.com/ja/2018.1/Manual/class-PlayerSettingsiOS.html
よし! Unityで設定して、Xcodeも設定したままでビルドしたら回転しました!