TCP/IP를 통해 MonoDevelop 디버거를 ADB가 있는 Android 디바이스에 연결할 수 있습니다. 절차는 다음과 같습니다.
디바이스에서 “USB 디버깅” 을 활성화하고 USB 케이블로 해당 디바이스를 개발 머신에 연결합니다. 사용하는 디바이스가 개발 머신과 동일한 서브넷 마스크와 게이트웨이에 있는지 확인합니다. 또한 다른 활성 네트워크가 디바이스에 연결되어 있지 않도록 확인합니다. 즉, 모바일/셀룰러 네트워크를 통한 데이터 액세스를 비활성화합니다.
개발 머신에서 터미널/cmd를 열고 ADB의 포지션으로 이동합니다. ADB 툴은 <sdk>/platform-tools/에서 찾을 수 있습니다.
다음 커맨드를 사용하여 TCP/IP 모드에서 호스트 ADB를 재시작합니다.
adb tcpip 5555
그러면 5555번 포트를 사용하여 ADB가 TCP/IP를 통해 활성화됩니다. 5555번 포트를 사용할 수 없는 경우 다른 포트를 사용해야 합니다(ADB 참조). 다음과 같은 출력이 표시됩니다.
restarting in TCP mode port: 5555
adb connect DEVICEIPADDRESS
DEVICEIPADDRESS에는 Android 디바이스의 실제 IP 주소를 입력합니다. 그러면 다음과 같은 출력이 표시됩니다.
connected to DEVICEIPADDRESS:5555
adb devices
그러면 다음과 같은 출력이 생성됩니다.
List of devices attached
DEVICEIPADDRESS:5555 device
디바이스에 Unity 애플리케이션을 빌드하고 실행합니다. 개발 빌드 플래그가 활성화되고 스크립트 디버깅 이 켜진 상태에서 애플리케이션을 빌드해야 합니다.
디바이스가 더 이상 개발 머신에 연결되어 있지 않아도 되므로 USB 케이블을 분리합니다.
마지막으로 애플리케이션이 디바이스에서 실행 중인 동안 MonoDevelop에서 스크립트를 열고 중단점을 추가하고 “Run” -> “Attach to Process” 를 선택하고 리스트에서 디바이스를 선택합니다. 디바이스가 리스트에 표시되는 데 몇 초 정도 걸릴 수 있습니다. 애플리케이션이 실행되고 있지 않거나 디바이스의 디스플레이가 절전 모드로 전환될 경우 디바이스가 리스트에 표시되지 않을 수 있습니다.
자세한 내용을 확인하고 문제를 해결하려면 Android 개발자를 위한 ADB 가이드에서 Wireless Usage 섹션을 참조하십시오.
참고: 디바이스에서 멀티캐스트 메시지를 보내고 에디터와 MonoDevelop에서 해당 메시지를 구독/수신합니다. 이 프로세스를 통해 의도한 효과를 얻으려면 네트워크를 멀티캐스팅에 적합하게 설정해야 합니다.
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.