# WriteBytes(void*, int)

> Writes the specified number of bytes and advances the current write position by that number of bytes.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities.Serialization](/engine/7000.0/script-reference/unity/entities/serialization.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public void WriteBytes(void* data, int bytes)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): The data to write.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of bytes to write.
