Connect Android devices to Unity Profiler Performance Analyzer

Source: Internet
Author: User

Connect Android devices to Unity Profiler Performance Analyzer

Unity provides two methods for developers to connect Android devices to Profiler for performance analysis:

1. The Android device and computer are in the same Wlan through wifi.

2. USB ADB


Generally, our computer is a network cable, so we use ADB. ADB is more responsive to device performance than wifi.


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 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:Unityinsert bundle identifier hereNote: 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.

Follow the steps in this document to translate them here:

First, set ADB:

Open the CMD command line window and enter the following command:

adb forward tcp:54999 localabstract:Unity-com.thisisgame.gamedemo

Then, check the Development Build check when you use the Export Android project in Unity.

Then open the game on your phone.

Open the Unity Profiler window and select (ADB@127.0.0.1: 54999)

Then we can analyze the performance in Profiler.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.