# GetBodyUpdateOwnerUserData(Allocator)

> Get all _ownerUserData assigned to each PhysicsBody returned with _bodyUpdateEvents. The Native Array returned will be of the same length and be ordered the same as the PhysicsEvents.BodyUpdateEvent returned with _bodyUpdateEvents. Any PhysicsBody that are not valid will return a default PhysicsUserData.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.6/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public NativeArray<PhysicsUserData> GetBodyUpdateOwnerUserData(Allocator allocator = Allocator.Temp)
```

### Parameters

**** (\[Allocator]\(/engine/6000.6/script-reference/unity/collections/allocator)): The memory allocator to use for the results. This can only be [Allocator.Temp](/engine/6000.6/script-reference/unity/collections/allocator/temp.md), [Allocator.TempJob](/engine/6000.6/script-reference/unity/collections/allocator/tempjob.md) or [Allocator.Persistent](/engine/6000.6/script-reference/unity/collections/allocator/persistent.md).

### Returns

| Type                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [NativeArray\<PhysicsUserData>](/engine/6000.6/script-reference/unity/collections/nativearray1.md) | A Native Array containing all [PhysicsUserData](/engine/6000.6/script-reference/unity/u2d/physics/physicsuserdata.md) for each [PhysicsEvents.BodyUpdateEvent](/engine/6000.6/script-reference/unity/u2d/physics/physicsevents/bodyupdateevent.md) returned with [\_bodyUpdateEvents](/engine/6000.6/script-reference/unity/u2d/physics/physicsworld/bodyupdateevents.md). |
