Use of Unity Profiler and unityprofiler
Select three options: Development Build, Autoconnect Profiler, and Script Debugging, as shown in.
Click the Build And Run button to compile the project And install the APK on the Android device. The Profiler is automatically opened And displayed.
Steps for manually installing APK and starting Unity Profiler are shown in.
1. Install and start the APK;
2. Execute the command adb forward tcp: 34999 localabstract: Unity-{insert bundle identifier here };
3. Open the Profiler Window through the menu window> Profiler in Unity Editor;
4. In Profiler, select Active Profiler from the drop-down menu;
The most critical step is to manually execute adb forward tcp: 34999 localabstract: Unity-{insert bundle identifier here}, which is also one of the work done by Autoconnect Profiler. If the device is restarted or the adb is disconnected and reconnected, run the command again to perform port ing. If the Unity Profiler cannot be connected normally, run the adb forward -- list command to view the currently mapped port and check that the current Unity application port has been mapped.
The Unity remote Profiler tool is useful when the Unity application optimization and analysis interface is stuck or flickering. For example, the reason for the low frame rate (35FPS) of the Unity application is intuitively reflected.
Reference: Working in Unity Advanced Development Profiler overview Profiler window