모바일용 프로젝트를 개발하는 동안 사용할 수 있는 디바이스 전용 프로퍼티가 다수 있습니다. 자세한 내용은 SystemInfo.deviceUniqueIdentifier, SystemInfo.deviceName, SystemInfo.deviceModel 및 SystemInfo.operatingSystem Unity 스크립팅 API 페이지를 참조하십시오.
불법 복제자들은 앱에서 DRM 보호를 제거하고 무료로 재배포하곤 합니다. Unity는 불법 복제 방지 검사 기능이 있어서 앱이 Google Play 스토어에 제출된 이후 수정 사항이 있는지 검사할 수 있습니다.
사용자의 앱이 해킹되지 않은 정품인지 확인하려면 Unity 스크립팅 API Application.genuine 프로퍼티를 사용합니다. 만일 이 프로퍼티가 false
인 경우 앱 사용자에게 해킹된 앱을 사용하고 있음을 알리거나 앱의 일부 기능에 접근하지 못하도록 할 수 있습니다.
참고: 앱 무결성을 검증하려면 Application.genuineCheckAvailable과 Application.genuine을 동시에 사용합니다. Application.genuine 프로퍼티에 접근하는 것은 많은 리소스를 필요로 하므로 프레임 업데이트나 처리 시간이 중요한 코드 도중에는 이를 호출하지 마십시오.
진동을 발동시키려면 코드에서 Handheld.Vibrate를 호출합니다. 진동 하드웨어가 없는 디바이스는 이 호출을 무시합니다.
모바일 운영체제는 느린 작업에 활성화할 수 있는 빌트인 작업 표시기를 지원합니다.
이에 대한 예제는 Activity Indicator Unity Scripting API를 참조하십시오.
iOS 및 Android 프로젝트를 생성하는 경우 사용자 디바이스의 화면 방향을 조정할 수 있습니다. 화면 방향 변화를 감지하거나 특정 방향을 강제하는 것은 사용자가 어떻게 디바이스를 잡고 있는지에 따라 게임의 동작을 바꾸는데 유용합니다.
디바이스 방향에 대한 정보를 얻으려면 Screen.orientation 프로퍼티를 사용합니다. 방향은 다음 중 하나이어야 합니다.
방향 | 동작 |
---|---|
Portrait | 디바이스가 세워진 상태에서 홈 버튼이 아래에 있는 세로 모드입니다. |
PortraitUpsideDown | 디바이스가 세워진 상태에서 홈 버튼이 위에 있는 뒤집어진 세로 모드입니다. |
LandscapeLeft | 디바이스가 세워진 상태에서 홈 버튼이 오른쪽에 있는 가로 모드입니다. |
LandscapeRight | 디바이스가 세워진 상태에서 홈 버튼이 왼쪽에 있는 가로 모드입니다. |
화면 방향을 제어하려면 Screen.orientation을 위의 옵션 중 하나로 설정하거나, ScreenOrientation.AutoRotation으로 설정합니다.
자동 회전을 사용하면 경우에 따라 일부 방향을 비활성화할 수 있습니다. 자세한 내용은 Screen.autorotateToPortrait, Screen.autorotateToPortraitUpsideDown, Screen.autorotateToLandscapeLeft 및 Screen.autorotateToLandscapeRight 스크립팅 API 페이지를 참조하십시오.
2017–05–25 편집 리뷰를 거쳐 페이지 게시됨
5.5에서 업데이트 된 기능
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.