크로스 플랫폼 프로젝트에서는 UNITY_ANDROID
정의 지시문을 사용하여 조건부로 Android 전용 C# 코드를 컴파일합니다. 자세한 내용은 플랫폼 종속 컴파일을 참조하십시오.
애플리케이션은 Input 및 Handheld 클래스를 통해 Android 기기의 기능에 대부분 액세스할 수 있습니다. 자세한 내용은 다음을 참조하십시오.
진동을 트리거하려면 Handheld.Vibrate를 호출합니다. 진동 하드웨어가 없는 기기는 이 호출을 무시합니다.
모바일 운영체제는 애플리케이션에서 느린 작업에 사용할 수 있는 빌트인 작업 표시기를 지원합니다. 자세한 내용은 Handheld.StartActivityIndicator를 참조하십시오.
기기별 프로퍼티에 액세스하려면 다음 API를 사용하십시오.
스크립트 | 기기 프로퍼티 |
---|---|
SystemInfo.deviceUniqueIdentifier | 항상 ANDROID_ID 의 md5를 반환합니다. 자세한 내용은 ANDROID_ID에 대한 Android 개발자 문서를 참조하십시오. |
SystemInfo.deviceName | 기기 이름입니다. Android 기기의 경우 Unity는 안전 시스템 설정에서 device_name 과 bluetooth_name 을 읽으려고 시도합니다. 이 문자열에 값이 없으면 Unity는 <unknown> 을 반환합니다. |
SystemInfo.deviceModel | 기기 모델을 반환합니다. 여기에는 종종 제조사 이름과 모델 번호(예: “LGE Nexus 5 또는 ”SAMSUNG-SM-G900A")가 포함됩니다. |
SystemInfo.operatingSystem | 운영체제 이름과 버전을 반환합니다. |
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.