Created
August 8, 2016 03:43
-
-
Save dev-chee/bc2802644fee4a4aa8e1868005faa719 to your computer and use it in GitHub Desktop.
Enable Unity3d Profiler for Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remote profiling can be enabled on Android devices through two different paths : WiFi or ADB. | |
For WiFi profiling, follow these steps: | |
Make sure to disable Mobile Data on your Android device. | |
Connect your Android device to your WiFi network. | |
Attach your device to your Mac/PC via cable, check the “Development Build” and “Autoconnect Profiler” checkboxes in Unity’s build settings dialog, and hit “Build & Run” in Unity Editor. | |
When the app launches on the device, open the profiler window in Unity Editor (Window->Profiler) | |
If the Unity Editor fails to autoconnect to the device, select the appropriate device from the Profiler Window Active Profiler drop down menu. Note: The Android device and host computer (running the Unity Editor) must both be on the same subnet for the device detection to work. | |
For ADB profiling, follow these steps: | |
Attach your device to your Mac/PC via cable and make sure ADB recognizes the device (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 launches on the device, open the profiler window in Unity Editor (Window->Profiler) | |
Select the AndroidProfiler(ADB@127.0.0.1:54999) from the Profiler Window Active Profiler drop down menu. Note: The Unity editor will automatically create an adb tunnel for your application when you press “Build & Run”. If you want to profile another application or you restart the adb server you have to setup this tunnel manually. To do this, open a Terminal window / CMD prompt and enter: | |
adb forward tcp:54999 localabstract:Unity-{insert bundle identifier here} | |
Note: The entry in the drop down menu is only visible when the selected target is Android. | |
If you are using a firewall, you need to make sure that ports 54998 to 55511 are open in the firewall’s outbound rules - these are the ports used by Unity for remote profiling. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment