# DestroyBatch(ReadOnlySpan<PhysicsShape>, bool)

> Destroy a batch of shapes, destroying all PhysicsShape.Contact the shapes are involved in. Any invalid shapes will be ignored including chain segment shapes created via a PhysicsChain (the chain must be destroyed)." Owned shapes will produce a warning and will not be destroyed (See PhysicsShape.SetOwner ). See PhysicsBody.MassConfiguration.

## Definition

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

```csharp
public static void DestroyBatch(ReadOnlySpan<PhysicsShape> shapes, bool updateBodyMass)
```

### Parameters

**** (\[ReadOnlySpan\<PhysicsShape>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The shapes to destroy.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to update the body mass configuration. Not doing so is faster, especially when destroying multiple shapes.
