Basic steps:
1. Unity Open the project you want to test: file–build Settings
2, such as, according to the order of the figure 1, 2, 3, 4, 5 operation, if done, 2 is gray, can not be clicked, 4 and 5 need to correspond.
3, make sure that the phone connected to the computer, USB debugging has been turned on, be sure to shut down the Windows Firewall, the firewall will block most ports, affect the phone port connection (this big pit has been engaged me for a long time).
Find your Android SDK directory, enter Platform-tools, my is E:\Program files\android-sdk-windows\platform-tools, confirm this directory exists Adb.exe.
Press the SHIFT key, right-click, and select the Open Window command here.
4, then enter the ADB forward tcp:54999 localabstract:unity-bejeweled, Bejeweled replaced with your package name, step two of the 4th red box, packages name.
Tips: On the first error is because there is no phone, the second phone connection mode is not selected USB connection, after successful no error can be x out of the cmd window.
5. Back to Unity, open Windows->profile and click on the prompt.
Note that the following port number is not the 54999 that was opened by ADB before, if not, it is invalid.
6, next do not close the profile panel, click File–build&run, wait for download, and then your project will be running on the phone.
7, so as long as ensure that the profile panel is not closed and mobile phone constantly open, change the project after the execution of File–build&run can be re-tested in the real machine.
Note: Do not connect to the phone to check if USB is connected, check if ADB debugging is turned on, and then check if Windows Firewall is turned off.
Unity Direct-attached Android real machine in profiler performance analysis test