# SetOwnerUserData(PhysicsUserData, int)

> Set PhysicsUserData that can be used for any purpose, typically by the owner only.

## Definition

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

```csharp
public void SetOwnerUserData(PhysicsUserData physicsUserData, int ownerKey = 0)
```

### Parameters

**** (\[PhysicsUserData]\(/engine/6000.5/script-reference/unity/u2d/physics/physicsuserdata)): The user data to set.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Optional owner key returned when using [PhysicsJoint.SetOwner](/engine/6000.5/script-reference/unity/u2d/physics/physicsjoint/setowner.md).
