Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DestroyJointBatch

Destroy a batch of joints. Any invalid joints will be ignored. Owned joints will produce a warning and will not be destroyed ( PhysicsJoint.SetOwner ).
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

DestroyJointBatch(ReadOnlySpan<PhysicsJoint>)

Destroy a batch of joints. Any invalid joints will be ignored. Owned joints will produce a warning and will not be destroyed (PhysicsJoint.SetOwner).
public static void DestroyJointBatch(ReadOnlySpan<PhysicsJoint> joints)

Parameters

The joints to destroy.

DestroyJointBatch(ReadOnlySpan<PhysicsJoint>, int)

Destroy a batch of joints. Any invalid joints are ignored. A joint owned by a different owner key is skipped and left valid; a joint with no owner, or one matching the given owner key, is destroyed. One summary warning reports how many joints were skipped this way, rather than one warning per joint.
public static void DestroyJointBatch(ReadOnlySpan<PhysicsJoint> joints, int ownerKey)

Parameters

The joints to destroy.

ownerKey

Optional owner key returned when using PhysicsJoint.SetOwner.

Remarks