Unity for some time, has been heard unity can be on the Android real Machine debugging, Miss a long, finally successfully debugged.
The information on the web is rarely felt and is hereby recorded for sharing.
The process is as follows:
1. To hit the Android version of the package, it is important to check the debug three options tick, respectively, development build, Antoconnect Profiler (Connection Profiler), script debugging (scripting Debugging)
2. Run the program on Android, do not run, Unity Profiler and Mono cannot find the program.
3. At this point, open the Profiler window in Unity Editor and click Active to see the options for the real machine device in the profiler. If not, keep looking down.
4. Real machine debugging needs to enter the following command, the profiler connection failure can also try.
adb forward tcp:54999 localabstract:Unity-<insert bundle identifier here>
举个例子吧
adb forward tcp:54999 localabstract:Unity-com.test.test
意思是把本地端口重定向到后面的unix域上去了,反正应该可以连上。如果还失败的继续往下看。
5. Here I have a guess, if you fail again, you can try to add the ADB path to the system path.
6. If you can see the profile, you can try Mono's attach, see if there is a real machine option, if there is, you can hang up debugging, not to continue to look down.
7. It should be noted that the phone and the debugger should be under a network segment.
8. No more. If not, go to the Unity website to see the documentation or Google Bar.
The unity on Android Real Machine debugging