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.
Read time 1 minuteLast updated 9 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public static void DestroyBatch(ReadOnlySpan<PhysicsShape> shapes, bool updateBodyMass)
Parameters
The shapes to destroy.
Whether to update the body mass configuration. Not doing so is faster, especially when destroying multiple shapes.