Version: 2020.3
public void BeginSample (Profiling.CustomSampler sampler);
public void BeginSample (string name);

参数

name 要对其进行采样的配置文件名称信息。
sampler The CustomSampler that the CommandBuffer uses for sampling.

描述

添加命令,以开始对配置文件进行采样。

将性能分析安排为在命令缓冲区执行到达此点时结束。这便于测量命令缓冲区的一个或多个命令所花费的 CPU 和 GPU 时间。

对于通过 BeginSample 开始的采样,必须始终以使用相同的名称参数调用 CommandBuffer.EndSample 结束。