Unity는 Android 기기에서 애플리케이션을 디버깅하는 다음의 방법을 지원합니다.
Unity supports USB debugging for Android devices. To use USB debugging, enable developer options on your device. To do this, refer to Android’s Configure developer options documentation.
컴퓨터에 기기를 연결하기 위해 USB 케이블을 사용합니다. Windows 컴퓨터에서는 기기에 맞는 USB 드라이버를 설치해야 할 수 있습니다. 자세한 내용은 기기 제조사 웹사이트를 참조하십시오.
설치 절차는 운영체제가 Windows인지 macOS인지에 따라 다릅니다. Android 기기를 SDK에 연결하는 데 대한 자세한 내용은 Android 개발자 문서에 있는 앱 실행 섹션을 참조하십시오.
Note: Unity doesn’t support USB debugging for ChromeOS devices. Instead, use Android Debug Bridge over wireless connection.
Unity supports Android Debug Bridge (ADB) over USB for Android devices and over wireless connection for Android and ChromeOS devices. Wireless connection is useful when you can’t perform USB debugging, such as when using a ChromeOS device, when a controller is plugged into the Android device, or when debugging VR applications and you insert the Android device into the VR Kit. For information on how to connect a ChromeOS device to Unity through ADB, refer to Debugging on a ChromeOS device.
To connect an Android device to Unity through ADB using a USB:
To wirelessly connect an Android device to Unity through ADB:
5555
, you don’t need to enter it. After Unity successfully connects to the device, it selects the device as the Run Device.Android 기기에서 애플리케이션 빌드를 실행할 때 Android는 스택 추적과 스크립트의 로그와 같은 메시지를 수집합니다. 이러한 메시지를 확인하기 위해 Android는 Logcat 명령줄 도구를 제공합니다. Unity 애플리케이션에서 이 도구를 사용하려면 다음 중 하나를 수행합니다.
logcat
파라미터로 ADB 실행$ adb logcat
For more information, refer to Android Logcat.