# GetBodyUpdateOwnerUserData(Allocator)

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

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule

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

### Parameters

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

### Returns

| Type                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [NativeArray\<PhysicsUserData>](/engine/6000.3/script-reference/unity/collections/nativearray1.md) | A Native Array containing all [PhysicsBody.ownerUserData](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsbody/owneruserdata.md) for each [PhysicsEvents.BodyUpdateEvent](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsevents/bodyupdateevent.md) returned with [PhysicsWorld.bodyUpdateEvents](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsworld/bodyupdateevents.md). |
