UNITY3D开发IOS 强制屏幕四个方向不旋转的方法
void Start () { //纵向 上下 两个方向 iPhoneKeyboard.autorotateToPortrait = false; iPhoneKeyboard.autorotateToPortraitUpsideDown = false; //横向 上下两个方向 iPhoneKeyboard.autorotateToLandscapeLeft = false; iPhoneKeyboard.autorotateToLandscapeRight = false; }
Input.deviceOrientation可以得到当前IOS设备屏幕的方向状态。
Screen.orientation设置屏幕的反转情况
详细的请转到MOMO的博客http://www.xuanyusong.com/archives/556
相关推荐
zouxin 2020-06-16
燕十二的BLOG 2020-06-10
Firstsight 2020-05-17
heqiang0 2020-05-10
唠叨的老黑 2020-05-08
Kafeidu 2020-03-05
Firstsight 2019-12-04
yinbaoshiguang 2011-08-18
zouxin 2014-03-22
zzlyym 2017-11-06
zouxin 2015-08-04
zhangmiaoping 2019-07-01
zzlyym 2017-05-09
zouxin 2019-06-28
yhhwatl 2019-06-26
HappyKocola 2019-06-20