# CopyPtrToStructure<T>(void*, out T)

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

## Definition

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

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

```csharp
public static void CopyPtrToStructure<T>(void* ptr, out T output) where T : struct
```

### Parameters

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