# CopyCounterValue

> Adds a command to copy ComputeBuffer or GraphicsBuffer counter value.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## CopyCounterValue(ComputeBuffer, ComputeBuffer, uint)

Adds a command to copy [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.7/script-reference/unityengine/graphicsbuffer.md) counter value.

```csharp
public void CopyCounterValue(ComputeBuffer src, ComputeBuffer dst, uint dstOffsetBytes)
```

### Parameters

**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Append/consume buffer to copy the counter from.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): A buffer to copy the counter to.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Target byte offset in `dst` buffer.

### Remarks

Note: this command can not be used on [LightEvent](/engine/6000.7/script-reference/unityengine/rendering/lightevent.md) command buffers.

Additional Resources: [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md) and [GraphicsBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/graphicsbuffer/copycount.md).

## CopyCounterValue(GraphicsBuffer, ComputeBuffer, uint)

Adds a command to copy [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.7/script-reference/unityengine/graphicsbuffer.md) counter value.

```csharp
public void CopyCounterValue(GraphicsBuffer src, ComputeBuffer dst, uint dstOffsetBytes)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Append/consume buffer to copy the counter from.**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): A buffer to copy the counter to.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Target byte offset in `dst` buffer.

### Remarks

Note: this command can not be used on [LightEvent](/engine/6000.7/script-reference/unityengine/rendering/lightevent.md) command buffers.

Additional Resources: [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md) and [GraphicsBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/graphicsbuffer/copycount.md).

## CopyCounterValue(ComputeBuffer, GraphicsBuffer, uint)

Adds a command to copy [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.7/script-reference/unityengine/graphicsbuffer.md) counter value.

```csharp
public void CopyCounterValue(ComputeBuffer src, GraphicsBuffer dst, uint dstOffsetBytes)
```

### Parameters

**** (\[ComputeBuffer]\(/engine/6000.7/script-reference/unityengine/computebuffer)): Append/consume buffer to copy the counter from.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): A buffer to copy the counter to.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Target byte offset in `dst` buffer.

### Remarks

Note: this command can not be used on [LightEvent](/engine/6000.7/script-reference/unityengine/rendering/lightevent.md) command buffers.

Additional Resources: [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md) and [GraphicsBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/graphicsbuffer/copycount.md).

## CopyCounterValue(GraphicsBuffer, GraphicsBuffer, uint)

Adds a command to copy [ComputeBuffer](/engine/6000.7/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.7/script-reference/unityengine/graphicsbuffer.md) counter value.

```csharp
public void CopyCounterValue(GraphicsBuffer src, GraphicsBuffer dst, uint dstOffsetBytes)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): Append/consume buffer to copy the counter from.**** (\[GraphicsBuffer]\(/engine/6000.7/script-reference/unityengine/graphicsbuffer)): A buffer to copy the counter to.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Target byte offset in `dst` buffer.

### Remarks

Note: this command can not be used on [LightEvent](/engine/6000.7/script-reference/unityengine/rendering/lightevent.md) command buffers.

Additional Resources: [ComputeBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/computebuffer/copycount.md) and [GraphicsBuffer.CopyCount](/engine/6000.7/script-reference/unityengine/graphicsbuffer/copycount.md).
