Select development build, Autoconnect profiler and script debugging, as shown in the figure below
Click build and run button to compile the project and install APK to Android device. At the same time, profiler will be automatically opened and displayed
The steps to manually install APK and start unity profiler are shown in the figure below
1. Install APK and start it
2. Execute the command ADB forward tcp:34999 localabstract :Unity-{insert bundle identifier here};
3. In unity editor, through the menu window > Profiler, open the profiler window
4. Select active profiler from the dropdown menu in profiler
The most critical step is to execute the ADB forward manually tcp:34999 localabstract : Unity – {insert bundle identifier here}, which is one of the works of Autoconnect profiler. If the device restarts, or the ADB disconnects and reconnects, the command needs to be executed again for port mapping. If the unity profiler cannot connect normally, you can use the command ADB forward — list to view the mapped ports and confirm that the ports of the current unity application have been mapped
The unity remote profiler tool is very useful for performance tuning of unity applications and analyzing problems such as stuck or flickering interfaces. For example, the following figure directly reflects the reason for the low frame rate (35fps) of unity application
Reference: working in unity advanced development profiler overview profiler window