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.
Use a USB cable to connect the device to your computer. If you are developing on a Windows computer, you might need to install a device-specific USB driver. Refer to the manufacturer’s website for your device for additional information.
The setup process differs for Windows and macOS. For more information on connecting your Android device to the SDK, refer to the Run Your App section of the Android Developer documentation.
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.