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(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 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 project的时候一定要勾选 Development Build

然后在手机上打开游戏。

打开Unity Profiler窗体选择(ADB@127.0.0.1:54999)

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

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

  1. Unity Profiler 性能分析

    Profiler窗口 1. CPU A. WaitForTargetFPS:       Vsync(垂直同步)功能所,即显示当前帧的CPU等待时间    B. Overhead:       Pro ...

  2. Unity runtime性能分析器

    一. Profiler: 1. CPU Usage A. WaitForTargetFPS: Vsync(垂直同步)功能所,即显示当前帧的CPU等待时间 B. Overhead: Profiler总体 ...

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

    mysql 的 sql 性能分析器主要用途是显示 sql 执行的整个过程中各项资源的使用情况.分析器可以更好的展示出不良 SQL 的性能问题所在. 下面我们举例介绍一下 MySQL SQL Profi ...

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

    基础步骤: 1.Unity打开你要测试的项目:File–Build Settings 2.如下图,按图顺序进行1.2.3.4.5操作,如果做过了,2就是灰色的,不能被点击,4和5需要相对应. 3.确保 ...

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

    先检查手机usb调试是否开启,已经开启还是连不上按照以下步骤操作: 1. 打开cmd,输入adb devices  查看设备是否连接 2.服务未启动,先杀掉服务:adb kill-server 3.启 ...

  6. adb通过wifi连接android设备

    问题背景 近期的项目测试中,需要将移动设备与厂商机器进行usb连接视频传输(投屏).测试过程中需要定位问题,经常需要查看实时日志,移动设备已经和厂商机器usb连接投屏,无法用usb连接到PC,那么有什 ...

  7. adb 通过 WiFi 连接 Android 设备

    PC 和 Android 设备连接在同一个局域网. 查看 Android 设备的 IP:设置 > WLAN > 选择连接的WiFi > 查看IP地址. PC 端执行: ping &l ...

  8. 远程调试 Android 设备使用入门(谷歌翻译版)

    移动前端调试方案(Android + Chrome 实现远程调试) 目录 要求 第 1 步:发现您的 Android 设备 第 2 步:从您的开发计算机调试 Android 设备上的内容. 更多操作: ...

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

    网上关于通过android来操作打印机的例子太少了,为了方便更多的开发同仁,将近日所学分享一下. 我这边是通过android设备通过无线来对打印机(佳博58mm热敏式-58130iC)操作,实现餐厅小 ...

随机推荐

  1. Phoenix(sql on hbase)简单介绍

    Phoenix(sql on hbase)简单介绍 介绍: Phoenix is a SQL skin over HBase delivered as a client-embedded JDBC d ...

  2. Java得到年在一个季度的错误的第一天

    1.错误叙述性说明 Exception in thread "main" java.lang.IllegalArgumentException: Cannot format giv ...

  3. RestServer 1.1发布

    具体配置方法参照第一版:http://www.cnblogs.com/devgis/p/4947191.html BUG反馈 QQ:80163278 邮箱:devgis@qq.com 淘宝:http: ...

  4. Groovy与Java集成常见的坑(转)

    groovy特性 Groovy是一门基于JVM的动态语言,同时也是一门面向对象的语言,语法上和Java非常相似.它结合了Python.Ruby和Smalltalk的许多强大的特性,Groovy 代码能 ...

  5. Struts2详细说明

    最近学习Struts2,阅读一些好的博客.收集有关. 原博文地址:http://blog.csdn.net/zz_mm/article/details/5460397 1.    深入Struts2的 ...

  6. 为网站添加IE6升级提示

    原文 为网站添加IE6升级提示 IE6的是一款横跨十年的浏览器,作为一枚前端,对其已经失望透顶,但其在中国的市场比仍旧很高,中国大量的PC上安装的都是盗版Windows XP,而Windows XP上 ...

  7. webserver实现

    最近的工作需求client和server使用https协议进行通讯,我负责client编写程序,在操作系统的-depth理解认为一旦前webserver实现,整理代码: #include"a ...

  8. 每天收获一点点------Hadoop RPC机制的使用

    一.RPC基础概念 1.1 RPC的基础概念 RPC,即Remote Procdure Call,中文名:远程过程调用: (1)它允许一台计算机程序远程调用另外一台计算机的子程序,而不用去关心底层的网 ...

  9. HDU 2120 Ice_cream's world I(并检查集合)

    职务地址:HDU 2120 这题尽管字数不多,但就是看不懂. . 意思是求最多有多少个被墙围起来的区域.显然就是求环的个数.然后用并查集求环个数就能够了. 代码例如以下: #include <i ...

  10. java线程API学习 线程池ThreadPoolExecutor(转)

    线程池ThreadPoolExecutor继承自ExecutorService.是jdk1.5加入的新特性,将提交执行的任务在内部线程池中的可用线程中执行. 构造函数 ThreadPoolExecut ...