# SetName(string, int)

> Set the name of the world, truncated to PhysicsConstants.MaxWorldNameLength characters. The name of the _defaultWorld cannot be set and will always be "Default World".

## Definition

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

```csharp
public void SetName(string name, int ownerKey = 0)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name to set.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Optional owner key returned when using [PhysicsWorld.SetOwner](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/setowner.md).

### Remarks

See [PhysicsWorld.GetName](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/getname.md).
