# CopyStructureToPtr<T>(ref T, void*)

> Copies sizeof(T) bytes from a memory pointer to a struct.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.6/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.CoreModule

## CopyStructureToPtr\<T>(T, void\*)

```csharp
public static void CopyStructureToPtr<T>(ref T input, void* ptr) where T : struct
```

### Parameters

**** (T): A struct to copy data to.**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): The memory pointer to copy from.
