Version: 2020.2
public void SetCounterValue (uint counterValue);

参数

counterValue 附加/使用计数器的值。

描述

设置附加/使用缓冲区的计数器值。

Append/consume and counter buffers (see GraphicsBuffer.Target.Append, GraphicsBuffer.Target.Counter) keep track of the number of elements in them with a special counter variable. SetCounterValue explicitly sets the counter value.

这可用于重置计数器或将其设置为指定值。

注意:当通过 Graphics.SetRandomWriteTarget 来绑定该缓冲区时无法调用 SetCounterValue。

另请参阅:CopyCountGraphics.SetRandomWriteTarget