출처: http://devilchen.tistory.com/4766
터치 스크린 키보드 관련된 것이 Screen 객체로 통합된 관계로...
UIManager.cs 파일에 아래와 같이 되어있는 부분을
#if UNITY_IPHONE || UNITY_ANDROID
#if UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_0
|| UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6
|| UNITY_4_7 || UNITY_4_8 || UNITY_4_9
TouchScreenKeyboard.autorotateToPortrait = autoRotateKeyboardPortrait;
TouchScreenKeyboard.autorotateToPortraitUpsideDown = autoRotateKeyboardPortraitUpsideDown;
TouchScreenKeyboard.autorotateToLandscapeLeft = autoRotateKeyboardLandscapeLeft;
TouchScreenKeyboard.autorotateToLandscapeRight = autoRotateKeyboardLandscapeRight;
#else
iPhoneKeyboard.autorotateToPortrait = autoRotateKeyboardPortrait;
iPhoneKeyboard.autorotateToPortraitUpsideDown = autoRotateKeyboardPortraitUpsideDown;
iPhoneKeyboard.autorotateToLandscapeLeft = autoRotateKeyboardLandscapeLeft;
iPhoneKeyboard.autorotateToLandscapeRight = autoRotateKeyboardLandscapeRight;
#endif
아래와 같이 바꾼다.
#if UNITY_IPHONE || UNITY_ANDROID
#if UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_0 || UNITY_4_1
|| UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8
|| UNITY_4_9
Screen.autorotateToPortrait = autoRotateKeyboardPortrait;
Screen.autorotateToPortraitUpsideDown = autoRotateKeyboardPortraitUpsideDown;
Screen.autorotateToLandscapeLeft = autoRotateKeyboardLandscapeLeft;
Screen.autorotateToLandscapeRight = autoRotateKeyboardLandscapeRight;
Screen.autorotateToPortrait = autoRotateKeyboardPortrait;
#else
iPhoneKeyboard.autorotateToPortrait = autoRotateKeyboardPortrait;
iPhoneKeyboard.autorotateToPortraitUpsideDown = autoRotateKeyboardPortraitUpsideDown;
iPhoneKeyboard.autorotateToLandscapeLeft = autoRotateKeyboardLandscapeLeft;
iPhoneKeyboard.autorotateToLandscapeRight = autoRotateKeyboardLandscapeRight;
#endif
'IT_Games > Unity3D' 카테고리의 다른 글
Unity에서 Android의 기능을 확장하는 두 가지 방법은? (0) | 2014.06.29 |
---|---|
Unity3D Android GCM Integration (0) | 2013.08.06 |
Unity3D yield 사용법! (0) | 2013.06.27 |
[unity3d][C#] 효과적인 C# 메모리 관리 기법 (0) | 2013.06.24 |
[펌] Unity3D 를 활용한 3D 컨텐츠 개발 (0) | 2013.06.20 |