Version: Unity 6.4 Alpha (6000.4)
LanguageEnglish
  • C#

ColliderArray2D

struct in UnityEngine

/

Implemented in:UnityEngine.Physics2DModule

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

Description

A collection of Collider2D.

The collection of Collider2D can be enumerated using "foreach" or its contents accessed via an indexer. The collection does not allocate any managed memory but must be disposed of.

This collection can only be created by Unity and is typically returned as results from physics queries.

Properties

Property Description
LengthThe number of Collider2D elements in the collection.
this[int]An indexer allowing access to any Collider2D in the collection.

Public Methods

Method Description
DisposeDisposes of the native memory allocated by the collection.
GetEnumeratorGets an enumerator which allows iteration of the collection. This is typically used implicitly by "foreach".