Android设备连接Unity Profiler性能分析器

Unity提供两种方式让Developer的Android设备连接Profiler进行性能分析:

1、通过wifi,Android设备和计算机处于同一个Wlan中。

2、通过USB ADB

一般情况我们的计算机都是网线,所以我们采用ADB的方式。相比与wifi,ADB也更及时的反应设备性能。

官方的英文文档如下:

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([email protected]: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 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.

按照文档的步骤,这里我来翻译一下:

首先我们先设置ADB:

打开CMD命令行窗口,输入以下命令:

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

然后 从Unity中Export Android 工程的时候一定要勾选 Development Build

然后在手机上打开游戏。

打开Unity Profiler窗口选择([email protected]:54999)

然后就能在Profiler进行性能分析了。

时间: 2024-08-01 08:45:22

Android设备连接Unity Profiler性能分析器的相关文章

[MySQL优化] -- 如何使用SQL Profiler 性能分析器

mysql 的 sql 性能分析器主要用途是显示 sql 执行的整个过程中各项资源的使用情况.分析器可以更好的展示出不良 SQL 的性能问题所在. 下面我们举例介绍一下 MySQL SQL Profiler 的使用方法: 首先,开启 MySQL SQL Profiler mysql> SELECT @@profiling; +-------------+ | @@profiling | +-------------+ | 0 | +-------------+ 1 row in set (0.0

unity直连android真机在Profiler性能分析测试

基础步骤: 1.Unity打开你要测试的项目:File–Build Settings 2.如下图,按图顺序进行1.2.3.4.5操作,如果做过了,2就是灰色的,不能被点击,4和5需要相对应. 3.确保手机连接电脑,USB调试已打开,一定要关闭windows防火墙,防火墙会屏蔽大多数端口,影响手机端口连接(这个大坑搞了我好久). 找到你的Android SDK 目录,进入platform-tools,我的是E:\Program Files\android-sdk-windows\platform-

Unity3D-Unity Profiler性能分析器

长话短说,我整理了一下mac版Unity3D pro下的Profiler连接Android的使用.注意是专业版的Unity3D.在Window下会有Profiler 这个工具的意义是,游戏在客户端跑然后UnityProfile测试一些参数 连接手机有两种方式. 1.wifi:让手机和电脑痛处于同一局域网内. 2.数据线连接(下好各种驱动),一般只要Unity中 Build And Run 时游戏能在客户端跑  就基本连接没问题 开始 1.File->Build Setting 注意勾选 Deve

android设备连接不上电脑的解决方法

先检查手机usb调试是否开启,已经开启还是连不上按照以下步骤操作: 1. 打开cmd,输入adb devices  查看设备是否连接 2.服务未启动,先杀掉服务:adb kill-server 3.启动adb服务,adb start-server 4.如果启动失败,可能是某个进程占用了adb的5037端口,查找占用端口号5037的连接 netstat -ano | findstr "5037" 例 TCP    127.0.0.1:58440        127.0.0.1:5037

adb 通过 WiFi 连接 Android 设备

PC 和 Android 设备连接在同一个局域网. 查看 Android 设备的 IP:设置 > WLAN > 选择连接的WiFi > 查看IP地址. PC 端执行: ping <Android-IP> ,确认可以相互通信. 连接,PC 端执行: adb connect <Android-IP> .ps:首次连接的时候可能会报错:由于目标计算机积极拒绝,无法连接. (10061).此时,需要用adb tcpip模式重启adb(还是得用USB线连上手机操作...) 

远程调试 Android 设备使用入门

远程调试 Android 设备使用入门 目录 要求 第 1 步:发现您的 Android 设备 第 2 步:从您的开发计算机调试 Android 设备上的内容. 更多操作:重新加载.聚焦或关闭一个标签 检查元素 Android 设备到开发计算机的抓屏 反馈 By Kayce Basques Technical Writer at Google 从 Windows.Mac 或 Linux 计算机远程调试 Android 设备上的实时内容. 本教程将向您展示如何: 设置您的 Android 设备进行

18、ESC/POS指令集在android设备上使用实例(通过socket)

网上关于通过android来操作打印机的例子太少了,为了方便更多的开发同仁,将近日所学分享一下. 我这边是通过android设备通过无线来对打印机(佳博58mm热敏式-58130iC)操作,实现餐厅小票的打印.写了一个简单的小demo,分享下. 前提: 1.android设备一个(coolPad8085N) 2.小票打印机(佳博 58mm热敏式打印机-58130IC) 这里将打印机IP设置为固定IP(这里略微复杂,是前辈设置过的,我没有具体操作,问了一下:打印机自检出的条子可以显示IP.通过自带

通过ADB命令行卸载或删除你的Android设备中的应用(转载)

转自:http://mytiankong.com/?p=11755 如果你对你的Android设备在与命令行的交互间有一定的兴趣,那你可能想学习一些使用ADB卸载设备中已安装应用的技巧.为了使这种方法生效,你将需要在你的电脑中设置好Android ADB.可以去看看关于“ADB”(Android Debug Bridge)与“ADB”(Android Debug Bridge)怎样安装使用两文.另外,你的Android设备必须要能被你的电脑识别,这个层面自然就涉及到Android USB驱动安装

[转] Unity的Profiler性能分析

Unity优化系列文章:http://www.unity.5helpyou.com/tag/unity%E4%BC%98%E5%8C%96 本文转截自:http://www.unity.5helpyou.com/2791.html   1.CPU A. WaitForTargetFPS:       Vsync(垂直同步)功能所,即显示当前帧的CPU等待时间    B. Overhead:       Profiler总体时间-所有单项的记录时间总和.用于记录尚不明确的时间消耗,以帮助进一步完善