Version: 2022.3
언어: 한국어
테스트와 디버그
Android 심볼

Android 기기에서 디버깅

Unity는 Android 기기에서 애플리케이션을 디버깅하는 다음의 방법을 지원합니다.

USB 디버깅

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.

Android 디버그 브리지

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.

Connect via USB

To connect an Android device to Unity through ADB using a USB:

  1. Enable ADB on the device. For information on how to do this, refer to Set up a device for development.
  2. Use a USB cable to connect your Android device to the machine running Unity.
  3. In Unity, open Android Build settings.
  4. In the Build settings window, select the Run Device drop-down and select your device from the options. If your device doesn’t appear, click Refresh.

Connect wirelessly

To wirelessly connect an Android device to Unity through ADB:

  1. Enable ADB on the device. For information on how to do this, refer to Set up a device for development.
  2. Find the IP address of your device. The process to do this depends on your device manufacturer.
  3. In Unity, open Android Build settings.
  4. In the Build settings window, select the Run Device drop-down and then select the <Enter IP> option.
  5. In the window that opens, enter the IP address and port number of the device and select Add. If the device’s port number is 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는 스택 추적과 스크립트의 로그와 같은 메시지를 수집합니다. 이러한 메시지를 확인하기 위해 Android는 Logcat 명령줄 도구를 제공합니다. Unity 애플리케이션에서 이 도구를 사용하려면 다음 중 하나를 수행합니다.

  • 다음의 logcat 파라미터로 ADB 실행
    $ adb logcat
  • Logcat 명령줄 도구를 구현하고 Unity 전용 창에 애플리케이션의 메시지를 표시하는 Android Logcat 패키지를 사용합니다.

For more information, refer to Android Logcat.

테스트와 디버그
Android 심볼
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961