UnityEngine.Physics2D.OverlapAreaAll C# (CSharp) Method

OverlapAreaAll() public static method

Get a list of all colliders that fall within a rectangular area.

public static OverlapAreaAll ( Vector2 pointA, Vector2 pointB, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]
pointA Vector2 One corner of the rectangle.
pointB Vector2 Diagonally opposite corner of the rectangle.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than or equal to this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than or equal to this value.
return Collider2D[]
        public static Collider2D[] OverlapAreaAll(Vector2 pointA, Vector2 pointB, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
        {
            return INTERNAL_CALL_OverlapAreaAll(ref pointA, ref pointB, layerMask, minDepth, maxDepth);
        }

Same methods

Physics2D::OverlapAreaAll ( Vector2 pointA, Vector2 pointB ) : Collider2D[]
Physics2D::OverlapAreaAll ( Vector2 pointA, Vector2 pointB, int layerMask ) : Collider2D[]
Physics2D::OverlapAreaAll ( Vector2 pointA, Vector2 pointB, int layerMask, float minDepth ) : Collider2D[]
Physics2D