# SetProxyCategories(ProxyHandle, PhysicsMask)

> Set the proxy categories. This can be an expensive operation as all ancestors need to be recalculated.

## Definition

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

```csharp
public void SetProxyCategories(PhysicsSpace.ProxyHandle proxyHandle, PhysicsMask categories)
```

### Parameters

**** (\[ProxyHandle]\(/engine/6000.6/script-reference/unity/u2d/physics/physicsspace/proxyhandle)): The proxy to set.**** (\[PhysicsMask]\(/engine/6000.6/script-reference/unity/u2d/physics/physicsmask)): The categories as a physics mask to set.
