Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

PhysicsWorld.DestroyShapeBatch

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void DestroyShapeBatch(ReadOnlySpan<PhysicsShape> shapes, bool updateBodyMass);

Parameters

Parameter Description
shapes The shapes to destroy.
updateBodyMass Whether to update the body mass configuration. Not doing so is faster, especially when destroying multiple shapes.

Description

Destroy a batch of shapes, destroying all 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 (PhysicsShape.SetOwner). See MassConfiguration.