语言English
  • C#

FrameDataView.GetCounterValueAsLong

声明

public long GetCounterValueAsLong(int markerId);

参数

markerId 标记标识符。

返回值

long 返回计数器值作为 long 类型。

描述

获取帧中计数器标记的最后一个值,作为长整型数据类型。

用于使用 MarkerFlags.Counter 标记检索标记的最后一个数据样本。

using UnityEditor.Profiling;

class Example { static unsafe long ExtractMyCounterValue(FrameDataView frameData, string counterName) { var counterMarkerId = frameData.GetMarkerId(counterName); return frameData.GetCounterValueAsLong(counterMarkerId); } }

注意
如果该帧中没有为计数器生成数据,则返回值为 0。

其他资源:HasCounterValueGetCounterValuePtr


Did you find this page useful? Please give it a rating: