Version: 2023.1
LanguageEnglish
  • C#

CompositeCollider2D.GetCompositedColliders

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

Switch to Manual

Declaration

public int GetCompositedColliders(List<Collider2D> colliders);

Parameters

colliders A list of Collider2D that are being composited.

Returns

int The number of colliders returned.

Description

When any Collider2D is using any composite operation other than Collider2D.CompositeOperation.None then it is used by this CompositeCollider2D.

The order of the Collider2D returned is sorted into ascending composite order as defined by Collider2D.compositeOrder.

See Also: Collider2D.compositeOperation and Collider2D.compositeOrder.