Unity provides two ways to enable developer's Android device to connect to the profiler for performance analysis:
1, through the wifi,android device and the computer in the same WLAN.
2. Via USB ADB
In general, our computers are wired, so we use the ADB approach. Compared with the WIFI,ADB also more timely reaction equipment performance.
The official English documents are as follows:
Http://docs.unity3d.com/Manual/Profiler.html
For ADB profiling, follow these steps:attach your device to your mac/pc via cable and make sure ADB recognizes the dev Ice (i.e. it shows in ADB devices list). Check the "Development Build" checkbox in Unity's Build Settings dialog, and hit "Build & Run". When the app is launches on the device, open the profiler windows in Unity Editor (Window->profiler) Select the ANDROIDP Rofiler ([email protected]:54999) from the profiler Window Active Profiler drop-down menu. Note:the Unity Editor would automatically create an ADB tunnel for your application when you press "Build & Run". If you want to profiles another application or you restart the ADB server, you are having to setup this tunnel manually. To does this, open a Terminal window/cmd prompt and enter adb forward tcp:54999 Localabstract:unityinsert bundle Identifie R herenote:the Entry in the Drop menu was only visible when the selected target was Android.if you were using a Firewal L, you need to make sure that ports 54998 to 55511 is open in the firewall ' s outbound Rules-these is the ports used by Unity for remote profiling.
Follow the documentation steps, here I translate:
First we set up the ADB first:
Open the CMD Command Line window and enter the following command:
ADB forward tcp:54999 Localabstract:unity-com.thisisgame.gamedemo
Then make sure to tick development Build When you export Android from unity.
Then open the game on your phone.
Open the Unity Profiler window selection ([email protected]:54999)
You can then perform a performance analysis on the profiler.
Android Device Connection Unity Profiler Performance Analyzer