https://connect.unity.com/p/unityzhong-de-yin-ying-you-hua
https://zentia.github.io/2019/04/11/unity-render-optimize/
https://www.cnblogs.com/alps/p/11227931.html
http://blog.sina.com.cn/s/blog_5423c45a0102x5hz.html
https://www.jianshu.com/p/62c117ddd08a
https://developer.qualcomm.com/software/adreno-gpu-profiler/tools
https://www.cnblogs.com/ghl_carmack/p/5401906.html
https://blog.csdn.net/daijy0111/article/details/50427758
https://blog.csdn.net/smallhujiu/article/details/81162183
https://developer.qualcomm.com/software/adreno-gpu-profiler/tools
http://alphaxiao.com/Blog/2017/04/03/RE_Unity_Based_on_AdrenoProfiler.html
https://blog.csdn.net/yangxuan0261/article/details/89139503
https://blog.csdn.net/woshixuhua/article/details/81711879
https://blog.csdn.net/yangxuan0261/article/details/89139503
打一个简易的android包:
https://blog.csdn.net/unity_http/article/details/79929454
https://penghuailiang.gitee.io/blog/2019/ndk/
https://www.jianshu.com/p/b1bd16422603
https://developer.qualcomm.com/software/snapdragon-profiler/tools
https://www.jianshu.com/p/86ea1776cf39
https://blog.csdn.net/LeoHiJack/article/details/80021569
Adreno Profiler
高通的GPU调试工具,使用mono开发,特别介绍一下,这是唯一可以比较方便导出渲染资源的工具,可以在不破解的情况下扒取游戏贴图,模型,shader等资源。不过导出的资源会丢失一些信息需要工具还原。
https://developer.qualcomm.com/software/adreno-gpu-profiler/tools
Snapdragon Profiler
https://developer.qualcomm.com/software/snapdragon-profiler
snapdragon profiler is profiling software that runs on the windows, mac, and linux platforms. it connect with android devices powered by snapdragon processors over USB. snapdragon profiler allows developers to analyze cpu, gpu, dsp, memory, thermal 热量, and network data, so they can find and fix performance bottlenecks.
features and benefits
- real-time view makes it easy to correlate system resource usage on a timeline.
a) analyze cpu, gpu, dsp, memory, power, thermal, and network data metrics.
b) selert from over 150 different hardware performance counters in 22 categories. - trace capture mode allows u to visualize kernel and system events on a timeline to analyze low-level system events across the cpu, gpu, and dsp.
a) view cpu scheduling and gpu stage data to see where your application is spending its time - snapshot capture*** mode allows u to capture and debug a rendered frame from any opengl es app.
a) step through and replay a rendered frame draw call-by-draw call
b) view and edit shaders and preview the results on your device
c) view and debug pixel history
d) capture and view gpu metrics per draw call - gpu aips: opengl es 3.1, opengl 2.1 and vulkan 1.0**
- Requires a Snapdragon 820 (or later) processor
** Requires Android N (or an Android 6.0 device with a graphics driver that supports Vulkan)
*** Requires a Snapdragon 805 (or later) processor and Android 6.0 (or later)
下载地址:https://developer.qualcomm.com/software/snapdragon-profiler
这个注册,需要一天,我找了别人下载了给我:
同时安装的时候,需要安装gtk,所以下载好之后先安装:
C:\Program Files (x86)\GtkSharp\2.12
官方下载地址: https://developer.qualcomm.com/software/snapdragon-profiler
安装时会要求安装这个 gtk-sharp-2.12.44.msi - https://dl.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.44.msi
这两个软件安装好之后,就是打包一个android的包了:
具体参考:https://blog.csdn.net/unity_http/article/details/79929454
1、新建工程
D:\Program Files\Unity2018\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono\Release\Classes
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="demo.xiaoming.com.xiaominglib">
<application
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true">
<activity android:name=".MainActivity2" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
下面是使用这个jar包:
新建unity项目,我这里使用的是unty2018
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class NewBehaviourScript : MonoBehaviour
{
public Text text;
private AndroidJavaClass unity;
private void Start()
{
if (unity == null)
{
unity = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
}
}
public void Add()
{
AndroidJavaObject currentActivity = unity.GetStatic<AndroidJavaObject>("currentActivity");
int a = currentActivity.Call<int>("Add", 2, 5);
text.text = a.ToString();
Debug.LogError("add = " + a);
}
}
打包,安装到手机即可。注意只有安装到手机上,上面的currentActivity才不会为null。才能正常运行。
下面是,snapdragon profiler如何连接手机呢?
settings中设置好jdk和android sdk的路径:
这样就连上了。
下面是截帧了:
点击:Launch Application,选择要启动的apk,然后启动:
此时手机在启动,不要force close,等待一会,会有一个确认框:点击ok
等待程序运行起来,点击Take Snapshot:
这样就可以看到顶点和片段着色器了。