Unity Frame Debugger和Profiler连接Android真机调试

当用Profiler分析到不是代码导致的性能问题,当前场景最大的性能瓶颈是渲染时,或者自己写的Shader要调试时,都可以用Frame Debugger进行调试。

按下列步骤设置打包,既可以用Profiler又可以用Frame Debugger连接Android真机:

① 手机开启开发者模式和USB调试,连接USB线到电脑

② Building Setting勾选Development Build,Autoconnect Profiler,Script Debugging。勾选Player Setting中的Multithreaded Rendering。点击Building And Run。打包成功后程序运行起来
Unity Frame Debugger和Profiler连接Android真机调试_第1张图片

Unity Frame Debugger和Profiler连接Android真机调试_第2张图片

③ Window->Profiler,选择AndroidPlayer([email protected]:34999),选中Record开始用Profiler监测。

Unity Frame Debugger和Profiler连接Android真机调试_第3张图片

④ Window->Frame Debugger,选择AndroidPlayer([email protected]:34999),选中Record开始用Frame Debugger监测。

Unity Frame Debugger和Profiler连接Android真机调试_第4张图片

你可能感兴趣的:(android,unity,游戏引擎)