0
任何幫助, 感謝單位4.5.4 Xcode項目的景觀模式ScreenOrientation在IOS 8
現在面臨在Unity 4.5.4的Xcode項目中的一個問題。
如何在ios 8中鎖定橫向模式ScreenOrientation?
任何幫助, 感謝單位4.5.4 Xcode項目的景觀模式ScreenOrientation在IOS 8
現在面臨在Unity 4.5.4的Xcode項目中的一個問題。
如何在ios 8中鎖定橫向模式ScreenOrientation?
ScreenOrientation ConvertToUnityScreenOrientation(UIInterfaceOrientation hwOrient,EnabledOrientation* outAutorotOrient){
EnabledOrientation autorotOrient = autorotPortrait;
ScreenOrientation unityScreenOrient = portrait;
switch (hwOrient)
{ case UIInterfaceOrientationPortrait:
autorotOrient = autorotPortrait;
unityScreenOrient = portrait;
break;
case UIInterfaceOrientationPortraitUpsideDown:
autorotOrient = autorotPortraitUpsideDown;
unityScreenOrient = portraitUpsideDown;
break;
case UIInterfaceOrientationLandscapeLeft:
autorotOrient = autorotLandscapeRight;
unityScreenOrient = landscapeRight;
break;
case UIInterfaceOrientationLandscapeRight:
autorotOrient = autorotLandscapeLeft;
unityScreenOrient = landscapeLeft;
break;
}
if (outAutorotOrient)
*outAutorotOrient = autorotOrient;
return portrait; // Now works in Landscape >.<
}
我們可以使用這種方法,我不能格式化這個答案對不起 – 2014-10-17 04:29:35
謝謝兄弟,我可以修復它 – 2014-10-17 04:23:04