C# Class UnityEngine.Physics2D

Global settings and helpers for 2D physics.

ファイルを表示 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Private Properties

Property Type Description
BoxCast RaycastHit2D
BoxCast RaycastHit2D
BoxCast RaycastHit2D
BoxCast RaycastHit2D
BoxCastAll UnityEngine.RaycastHit2D[]
BoxCastAll UnityEngine.RaycastHit2D[]
BoxCastAll UnityEngine.RaycastHit2D[]
BoxCastAll UnityEngine.RaycastHit2D[]
BoxCastNonAlloc int
BoxCastNonAlloc int
BoxCastNonAlloc int
BoxCastNonAlloc int
CapsuleCast RaycastHit2D
CapsuleCast RaycastHit2D
CapsuleCast RaycastHit2D
CapsuleCast RaycastHit2D
CapsuleCastAll UnityEngine.RaycastHit2D[]
CapsuleCastAll UnityEngine.RaycastHit2D[]
CapsuleCastAll UnityEngine.RaycastHit2D[]
CapsuleCastAll UnityEngine.RaycastHit2D[]
CapsuleCastNonAlloc int
CapsuleCastNonAlloc int
CapsuleCastNonAlloc int
CapsuleCastNonAlloc int
CircleCast RaycastHit2D
CircleCast RaycastHit2D
CircleCast RaycastHit2D
CircleCast RaycastHit2D
CircleCastAll UnityEngine.RaycastHit2D[]
CircleCastAll UnityEngine.RaycastHit2D[]
CircleCastAll UnityEngine.RaycastHit2D[]
CircleCastAll UnityEngine.RaycastHit2D[]
CircleCastNonAlloc int
CircleCastNonAlloc int
CircleCastNonAlloc int
CircleCastNonAlloc int
GetIgnoreCollision bool
GetIgnoreLayerCollision bool
GetLayerCollisionMask int
GetRayIntersection RaycastHit2D
GetRayIntersection RaycastHit2D
GetRayIntersectionAll UnityEngine.RaycastHit2D[]
GetRayIntersectionAll UnityEngine.RaycastHit2D[]
GetRayIntersectionAll UnityEngine.RaycastHit2D[]
GetRayIntersectionNonAlloc int
GetRayIntersectionNonAlloc int
INTERNAL_CALL_BoxCastAll UnityEngine.RaycastHit2D[]
INTERNAL_CALL_BoxCastNonAlloc int
INTERNAL_CALL_CapsuleCastAll UnityEngine.RaycastHit2D[]
INTERNAL_CALL_CapsuleCastNonAlloc int
INTERNAL_CALL_CircleCastAll UnityEngine.RaycastHit2D[]
INTERNAL_CALL_CircleCastNonAlloc int
INTERNAL_CALL_GetRayIntersectionAll UnityEngine.RaycastHit2D[]
INTERNAL_CALL_GetRayIntersectionNonAlloc int
INTERNAL_CALL_Internal_BoxCast void
INTERNAL_CALL_Internal_CapsuleCast void
INTERNAL_CALL_Internal_CircleCast void
INTERNAL_CALL_Internal_GetRayIntersection void
INTERNAL_CALL_Internal_Linecast void
INTERNAL_CALL_Internal_Raycast void
INTERNAL_CALL_LinecastAll RaycastHit2D[]
INTERNAL_CALL_LinecastNonAlloc int
INTERNAL_CALL_OverlapArea Collider2D
INTERNAL_CALL_OverlapAreaAll Collider2D[]
INTERNAL_CALL_OverlapAreaNonAlloc int
INTERNAL_CALL_OverlapBox Collider2D
INTERNAL_CALL_OverlapBoxAll Collider2D[]
INTERNAL_CALL_OverlapBoxNonAlloc int
INTERNAL_CALL_OverlapCapsule Collider2D
INTERNAL_CALL_OverlapCapsuleAll Collider2D[]
INTERNAL_CALL_OverlapCapsuleNonAlloc int
INTERNAL_CALL_OverlapCircle Collider2D
INTERNAL_CALL_OverlapCircleAll Collider2D[]
INTERNAL_CALL_OverlapCircleNonAlloc int
INTERNAL_CALL_OverlapPoint Collider2D
INTERNAL_CALL_OverlapPointAll Collider2D[]
INTERNAL_CALL_OverlapPointNonAlloc int
INTERNAL_CALL_RaycastAll RaycastHit2D[]
INTERNAL_CALL_RaycastNonAlloc int
INTERNAL_get_colliderAABBColor void
INTERNAL_get_colliderAsleepColor void
INTERNAL_get_colliderAwakeColor void
INTERNAL_get_colliderContactColor void
INTERNAL_get_gravity void
INTERNAL_set_colliderAABBColor void
INTERNAL_set_colliderAsleepColor void
INTERNAL_set_colliderAwakeColor void
INTERNAL_set_colliderContactColor void
INTERNAL_set_gravity void
IgnoreCollision void
IgnoreCollision void
IgnoreLayerCollision void
IgnoreLayerCollision void
Internal_BoxCast void
Internal_CapsuleCast void
Internal_CircleCast void
Internal_GetRayIntersection void
Internal_Linecast void
Internal_Raycast void
IsTouching bool
IsTouchingLayers bool
IsTouchingLayers bool
Linecast RaycastHit2D
Linecast RaycastHit2D
Linecast RaycastHit2D
LinecastAll RaycastHit2D[]
LinecastAll RaycastHit2D[]
LinecastAll RaycastHit2D[]
LinecastNonAlloc int
LinecastNonAlloc int
LinecastNonAlloc int
OverlapArea Collider2D
OverlapArea Collider2D
OverlapArea Collider2D
OverlapAreaAll Collider2D[]
OverlapAreaAll Collider2D[]
OverlapAreaAll Collider2D[]
OverlapAreaNonAlloc int
OverlapAreaNonAlloc int
OverlapAreaNonAlloc int
OverlapBox Collider2D
OverlapBox Collider2D
OverlapBox Collider2D
OverlapBoxAll Collider2D[]
OverlapBoxAll Collider2D[]
OverlapBoxAll Collider2D[]
OverlapBoxNonAlloc int
OverlapBoxNonAlloc int
OverlapBoxNonAlloc int
OverlapCapsule Collider2D
OverlapCapsule Collider2D
OverlapCapsule Collider2D
OverlapCapsuleAll Collider2D[]
OverlapCapsuleAll Collider2D[]
OverlapCapsuleAll Collider2D[]
OverlapCapsuleNonAlloc int
OverlapCapsuleNonAlloc int
OverlapCapsuleNonAlloc int
OverlapCircle Collider2D
OverlapCircle Collider2D
OverlapCircle Collider2D
OverlapCircleAll Collider2D[]
OverlapCircleAll Collider2D[]
OverlapCircleAll Collider2D[]
OverlapCircleNonAlloc int
OverlapCircleNonAlloc int
OverlapCircleNonAlloc int
OverlapPoint Collider2D
OverlapPoint Collider2D
OverlapPoint Collider2D
OverlapPointAll Collider2D[]
OverlapPointAll Collider2D[]
OverlapPointAll Collider2D[]
OverlapPointNonAlloc int
OverlapPointNonAlloc int
OverlapPointNonAlloc int
Raycast RaycastHit2D
Raycast RaycastHit2D
Raycast RaycastHit2D
Raycast RaycastHit2D
RaycastAll RaycastHit2D[]
RaycastAll RaycastHit2D[]
RaycastAll RaycastHit2D[]
RaycastAll RaycastHit2D[]
RaycastNonAlloc int
RaycastNonAlloc int
RaycastNonAlloc int
RaycastNonAlloc int
SetEditorDragMovement void
SetLayerCollisionMask void

Public Methods

Method Description
BoxCast ( Vector2 origin, Vector2 size, float angle, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D

Casts a box against colliders in the scene, returning the first collider to contact with it.

BoxCastAll ( Vector2 origin, Vector2 size, float angle, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : UnityEngine.RaycastHit2D[]

Casts a box against colliders in the scene, returning all colliders that contact with it.

BoxCastNonAlloc ( Vector2 origin, Vector2 size, float angle, Vector2 direction, RaycastHit2D results, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : int

Casts a box into the scene, returning colliders that contact with it into the provided results array.

CapsuleCast ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D

Casts a capsule against colliders in the scene, returning the first collider to contact with it.

CapsuleCastAll ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : UnityEngine.RaycastHit2D[]

Casts a capsule against colliders in the scene, returning all colliders that contact with it.

CapsuleCastNonAlloc ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, RaycastHit2D results, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : int

Casts a capsule into the scene, returning colliders that contact with it into the provided results array.

CircleCast ( Vector2 origin, float radius, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D

Casts a circle against colliders in the scene, returning the first collider to contact with it.

CircleCastAll ( Vector2 origin, float radius, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : UnityEngine.RaycastHit2D[]

Casts a circle against colliders in the scene, returning all colliders that contact with it.

CircleCastNonAlloc ( Vector2 origin, float radius, Vector2 direction, RaycastHit2D results, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : int

Casts a circle into the scene, returning colliders that contact with it into the provided results array.

GetRayIntersection ( Ray ray, [ distance, [ layerMask ) : RaycastHit2D

Cast a 3D ray against the colliders in the scene returning the first collider along the ray.

GetRayIntersectionNonAlloc ( Ray ray, RaycastHit2D results, [ distance, [ layerMask ) : int

Cast a 3D ray against the colliders in the scene returning the colliders along the ray.

Linecast ( Vector2 start, Vector2 end, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D

Casts a line against colliders in the scene.

LinecastAll ( Vector2 start, Vector2 end, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D[]

Casts a line against colliders in the scene.

LinecastNonAlloc ( Vector2 start, Vector2 end, RaycastHit2D results, [ layerMask, [ minDepth, [ maxDepth ) : int

Casts a line against colliders in the scene.

OverlapArea ( Vector2 pointA, Vector2 pointB, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D

Check if a collider falls within a rectangular area.

OverlapAreaAll ( Vector2 pointA, Vector2 pointB, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]

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

OverlapAreaNonAlloc ( Vector2 pointA, Vector2 pointB, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int

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

OverlapBox ( Vector2 point, Vector2 size, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D

Check if a collider falls within a box area.

OverlapBoxAll ( Vector2 point, Vector2 size, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]

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

OverlapBoxNonAlloc ( Vector2 point, Vector2 size, float angle, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int

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

OverlapCapsule ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D

Check if a collider falls within a capsule area.

OverlapCapsuleAll ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]

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

OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int

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

OverlapCircle ( Vector2 point, float radius, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D

Check if a collider falls within a circular area.

OverlapCircleAll ( Vector2 point, float radius, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]

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

OverlapCircleNonAlloc ( Vector2 point, float radius, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int

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

OverlapPoint ( Vector2 point, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D

Check if a collider overlaps a point in space.

OverlapPointAll ( Vector2 point, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]

Get a list of all colliders that overlap a point in space.

OverlapPointNonAlloc ( Vector2 point, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int

Get a list of all colliders that overlap a point in space.

Raycast ( Vector2 origin, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D

Casts a ray against colliders in the scene.

RaycastAll ( Vector2 origin, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D[]

Casts a ray against colliders in the scene, returning all colliders that contact with it.

RaycastNonAlloc ( Vector2 origin, Vector2 direction, RaycastHit2D results, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : int

Casts a ray into the scene.

Private Methods

Method Description
BoxCast ( Vector2 origin, Vector2 size, float angle, Vector2 direction ) : RaycastHit2D
BoxCast ( Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance ) : RaycastHit2D
BoxCast ( Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, int layerMask ) : RaycastHit2D
BoxCast ( Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, int layerMask, float minDepth ) : RaycastHit2D
BoxCastAll ( Vector2 origin, Vector2 size, float angle, Vector2 direction ) : UnityEngine.RaycastHit2D[]
BoxCastAll ( Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance ) : UnityEngine.RaycastHit2D[]
BoxCastAll ( Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, int layerMask ) : UnityEngine.RaycastHit2D[]
BoxCastAll ( Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, int layerMask, float minDepth ) : UnityEngine.RaycastHit2D[]
BoxCastNonAlloc ( Vector2 origin, Vector2 size, float angle, Vector2 direction, RaycastHit2D results ) : int
BoxCastNonAlloc ( Vector2 origin, Vector2 size, float angle, Vector2 direction, RaycastHit2D results, float distance ) : int
BoxCastNonAlloc ( Vector2 origin, Vector2 size, float angle, Vector2 direction, RaycastHit2D results, float distance, int layerMask ) : int
BoxCastNonAlloc ( Vector2 origin, Vector2 size, float angle, Vector2 direction, RaycastHit2D results, float distance, int layerMask, float minDepth ) : int
CapsuleCast ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction ) : RaycastHit2D
CapsuleCast ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance ) : RaycastHit2D
CapsuleCast ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, int layerMask ) : RaycastHit2D
CapsuleCast ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, int layerMask, float minDepth ) : RaycastHit2D
CapsuleCastAll ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction ) : UnityEngine.RaycastHit2D[]
CapsuleCastAll ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance ) : UnityEngine.RaycastHit2D[]
CapsuleCastAll ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, int layerMask ) : UnityEngine.RaycastHit2D[]
CapsuleCastAll ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, int layerMask, float minDepth ) : UnityEngine.RaycastHit2D[]
CapsuleCastNonAlloc ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, RaycastHit2D results ) : int
CapsuleCastNonAlloc ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, RaycastHit2D results, float distance ) : int
CapsuleCastNonAlloc ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, RaycastHit2D results, float distance, int layerMask ) : int
CapsuleCastNonAlloc ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, RaycastHit2D results, float distance, int layerMask, float minDepth ) : int
CircleCast ( Vector2 origin, float radius, Vector2 direction ) : RaycastHit2D
CircleCast ( Vector2 origin, float radius, Vector2 direction, float distance ) : RaycastHit2D
CircleCast ( Vector2 origin, float radius, Vector2 direction, float distance, int layerMask ) : RaycastHit2D
CircleCast ( Vector2 origin, float radius, Vector2 direction, float distance, int layerMask, float minDepth ) : RaycastHit2D
CircleCastAll ( Vector2 origin, float radius, Vector2 direction ) : UnityEngine.RaycastHit2D[]
CircleCastAll ( Vector2 origin, float radius, Vector2 direction, float distance ) : UnityEngine.RaycastHit2D[]
CircleCastAll ( Vector2 origin, float radius, Vector2 direction, float distance, int layerMask ) : UnityEngine.RaycastHit2D[]
CircleCastAll ( Vector2 origin, float radius, Vector2 direction, float distance, int layerMask, float minDepth ) : UnityEngine.RaycastHit2D[]
CircleCastNonAlloc ( Vector2 origin, float radius, Vector2 direction, RaycastHit2D results ) : int
CircleCastNonAlloc ( Vector2 origin, float radius, Vector2 direction, RaycastHit2D results, float distance ) : int
CircleCastNonAlloc ( Vector2 origin, float radius, Vector2 direction, RaycastHit2D results, float distance, int layerMask ) : int
CircleCastNonAlloc ( Vector2 origin, float radius, Vector2 direction, RaycastHit2D results, float distance, int layerMask, float minDepth ) : int
GetIgnoreCollision ( Collider2D collider1, Collider2D collider2 ) : bool
GetIgnoreLayerCollision ( int layer1, int layer2 ) : bool
GetLayerCollisionMask ( int layer ) : int
GetRayIntersection ( Ray ray ) : RaycastHit2D
GetRayIntersection ( Ray ray, float distance ) : RaycastHit2D
GetRayIntersectionAll ( Ray ray ) : UnityEngine.RaycastHit2D[]
GetRayIntersectionAll ( Ray ray, [ distance, [ layerMask ) : UnityEngine.RaycastHit2D[]
GetRayIntersectionAll ( Ray ray, float distance ) : UnityEngine.RaycastHit2D[]
GetRayIntersectionNonAlloc ( Ray ray, RaycastHit2D results ) : int
GetRayIntersectionNonAlloc ( Ray ray, RaycastHit2D results, float distance ) : int
INTERNAL_CALL_BoxCastAll ( Vector2 &origin, Vector2 &size, float angle, Vector2 &direction, float distance, int layerMask, float minDepth, float maxDepth ) : UnityEngine.RaycastHit2D[]
INTERNAL_CALL_BoxCastNonAlloc ( Vector2 &origin, Vector2 &size, float angle, Vector2 &direction, RaycastHit2D results, float distance, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_CapsuleCastAll ( Vector2 &origin, Vector2 &size, CapsuleDirection2D capsuleDirection, float angle, Vector2 &direction, float distance, int layerMask, float minDepth, float maxDepth ) : UnityEngine.RaycastHit2D[]
INTERNAL_CALL_CapsuleCastNonAlloc ( Vector2 &origin, Vector2 &size, CapsuleDirection2D capsuleDirection, float angle, Vector2 &direction, RaycastHit2D results, float distance, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_CircleCastAll ( Vector2 &origin, float radius, Vector2 &direction, float distance, int layerMask, float minDepth, float maxDepth ) : UnityEngine.RaycastHit2D[]
INTERNAL_CALL_CircleCastNonAlloc ( Vector2 &origin, float radius, Vector2 &direction, RaycastHit2D results, float distance, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_GetRayIntersectionAll ( Ray &ray, float distance, int layerMask ) : UnityEngine.RaycastHit2D[]
INTERNAL_CALL_GetRayIntersectionNonAlloc ( Ray &ray, RaycastHit2D results, float distance, int layerMask ) : int
INTERNAL_CALL_Internal_BoxCast ( Vector2 &origin, Vector2 &size, float angle, Vector2 &direction, float distance, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
INTERNAL_CALL_Internal_CapsuleCast ( Vector2 &origin, Vector2 &size, CapsuleDirection2D capsuleDirection, float angle, Vector2 &direction, float distance, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
INTERNAL_CALL_Internal_CircleCast ( Vector2 &origin, float radius, Vector2 &direction, float distance, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
INTERNAL_CALL_Internal_GetRayIntersection ( Ray &ray, float distance, int layerMask, RaycastHit2D &raycastHit ) : void
INTERNAL_CALL_Internal_Linecast ( Vector2 &start, Vector2 &end, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
INTERNAL_CALL_Internal_Raycast ( Vector2 &origin, Vector2 &direction, float distance, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
INTERNAL_CALL_LinecastAll ( Vector2 &start, Vector2 &end, int layerMask, float minDepth, float maxDepth ) : RaycastHit2D[]
INTERNAL_CALL_LinecastNonAlloc ( Vector2 &start, Vector2 &end, RaycastHit2D results, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_OverlapArea ( Vector2 &pointA, Vector2 &pointB, int layerMask, float minDepth, float maxDepth ) : Collider2D
INTERNAL_CALL_OverlapAreaAll ( Vector2 &pointA, Vector2 &pointB, int layerMask, float minDepth, float maxDepth ) : Collider2D[]
INTERNAL_CALL_OverlapAreaNonAlloc ( Vector2 &pointA, Vector2 &pointB, Collider2D results, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_OverlapBox ( Vector2 &point, Vector2 &size, float angle, int layerMask, float minDepth, float maxDepth ) : Collider2D
INTERNAL_CALL_OverlapBoxAll ( Vector2 &point, Vector2 &size, float angle, int layerMask, float minDepth, float maxDepth ) : Collider2D[]
INTERNAL_CALL_OverlapBoxNonAlloc ( Vector2 &point, Vector2 &size, float angle, Collider2D results, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_OverlapCapsule ( Vector2 &point, Vector2 &size, CapsuleDirection2D direction, float angle, int layerMask, float minDepth, float maxDepth ) : Collider2D
INTERNAL_CALL_OverlapCapsuleAll ( Vector2 &point, Vector2 &size, CapsuleDirection2D direction, float angle, int layerMask, float minDepth, float maxDepth ) : Collider2D[]
INTERNAL_CALL_OverlapCapsuleNonAlloc ( Vector2 &point, Vector2 &size, CapsuleDirection2D direction, float angle, Collider2D results, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_OverlapCircle ( Vector2 &point, float radius, int layerMask, float minDepth, float maxDepth ) : Collider2D
INTERNAL_CALL_OverlapCircleAll ( Vector2 &point, float radius, int layerMask, float minDepth, float maxDepth ) : Collider2D[]
INTERNAL_CALL_OverlapCircleNonAlloc ( Vector2 &point, float radius, Collider2D results, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_OverlapPoint ( Vector2 &point, int layerMask, float minDepth, float maxDepth ) : Collider2D
INTERNAL_CALL_OverlapPointAll ( Vector2 &point, int layerMask, float minDepth, float maxDepth ) : Collider2D[]
INTERNAL_CALL_OverlapPointNonAlloc ( Vector2 &point, Collider2D results, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_CALL_RaycastAll ( Vector2 &origin, Vector2 &direction, float distance, int layerMask, float minDepth, float maxDepth ) : RaycastHit2D[]
INTERNAL_CALL_RaycastNonAlloc ( Vector2 &origin, Vector2 &direction, RaycastHit2D results, float distance, int layerMask, float minDepth, float maxDepth ) : int
INTERNAL_get_colliderAABBColor ( Color &value ) : void
INTERNAL_get_colliderAsleepColor ( Color &value ) : void
INTERNAL_get_colliderAwakeColor ( Color &value ) : void
INTERNAL_get_colliderContactColor ( Color &value ) : void
INTERNAL_get_gravity ( Vector2 &value ) : void
INTERNAL_set_colliderAABBColor ( Color &value ) : void
INTERNAL_set_colliderAsleepColor ( Color &value ) : void
INTERNAL_set_colliderAwakeColor ( Color &value ) : void
INTERNAL_set_colliderContactColor ( Color &value ) : void
INTERNAL_set_gravity ( Vector2 &value ) : void
IgnoreCollision ( Collider2D collider1, Collider2D collider2 ) : void
IgnoreCollision ( Collider2D collider1, Collider2D collider2, [ ignore ) : void
IgnoreLayerCollision ( int layer1, int layer2 ) : void
IgnoreLayerCollision ( int layer1, int layer2, [ ignore ) : void
Internal_BoxCast ( Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
Internal_CapsuleCast ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
Internal_CircleCast ( Vector2 origin, float radius, Vector2 direction, float distance, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
Internal_GetRayIntersection ( Ray ray, float distance, int layerMask, RaycastHit2D &raycastHit ) : void
Internal_Linecast ( Vector2 start, Vector2 end, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
Internal_Raycast ( Vector2 origin, Vector2 direction, float distance, int layerMask, float minDepth, float maxDepth, RaycastHit2D &raycastHit ) : void
IsTouching ( Collider2D collider1, Collider2D collider2 ) : bool
IsTouchingLayers ( Collider2D collider ) : bool
IsTouchingLayers ( Collider2D collider, [ layerMask ) : bool
Linecast ( Vector2 start, Vector2 end ) : RaycastHit2D
Linecast ( Vector2 start, Vector2 end, int layerMask ) : RaycastHit2D
Linecast ( Vector2 start, Vector2 end, int layerMask, float minDepth ) : RaycastHit2D
LinecastAll ( Vector2 start, Vector2 end ) : RaycastHit2D[]
LinecastAll ( Vector2 start, Vector2 end, int layerMask ) : RaycastHit2D[]
LinecastAll ( Vector2 start, Vector2 end, int layerMask, float minDepth ) : RaycastHit2D[]
LinecastNonAlloc ( Vector2 start, Vector2 end, RaycastHit2D results ) : int
LinecastNonAlloc ( Vector2 start, Vector2 end, RaycastHit2D results, int layerMask ) : int
LinecastNonAlloc ( Vector2 start, Vector2 end, RaycastHit2D results, int layerMask, float minDepth ) : int
OverlapArea ( Vector2 pointA, Vector2 pointB ) : Collider2D
OverlapArea ( Vector2 pointA, Vector2 pointB, int layerMask ) : Collider2D
OverlapArea ( Vector2 pointA, Vector2 pointB, int layerMask, float minDepth ) : Collider2D
OverlapAreaAll ( Vector2 pointA, Vector2 pointB ) : Collider2D[]
OverlapAreaAll ( Vector2 pointA, Vector2 pointB, int layerMask ) : Collider2D[]
OverlapAreaAll ( Vector2 pointA, Vector2 pointB, int layerMask, float minDepth ) : Collider2D[]
OverlapAreaNonAlloc ( Vector2 pointA, Vector2 pointB, Collider2D results ) : int
OverlapAreaNonAlloc ( Vector2 pointA, Vector2 pointB, Collider2D results, int layerMask ) : int
OverlapAreaNonAlloc ( Vector2 pointA, Vector2 pointB, Collider2D results, int layerMask, float minDepth ) : int
OverlapBox ( Vector2 point, Vector2 size, float angle ) : Collider2D
OverlapBox ( Vector2 point, Vector2 size, float angle, int layerMask ) : Collider2D
OverlapBox ( Vector2 point, Vector2 size, float angle, int layerMask, float minDepth ) : Collider2D
OverlapBoxAll ( Vector2 point, Vector2 size, float angle ) : Collider2D[]
OverlapBoxAll ( Vector2 point, Vector2 size, float angle, int layerMask ) : Collider2D[]
OverlapBoxAll ( Vector2 point, Vector2 size, float angle, int layerMask, float minDepth ) : Collider2D[]
OverlapBoxNonAlloc ( Vector2 point, Vector2 size, float angle, Collider2D results ) : int
OverlapBoxNonAlloc ( Vector2 point, Vector2 size, float angle, Collider2D results, int layerMask ) : int
OverlapBoxNonAlloc ( Vector2 point, Vector2 size, float angle, Collider2D results, int layerMask, float minDepth ) : int
OverlapCapsule ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle ) : Collider2D
OverlapCapsule ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, int layerMask ) : Collider2D
OverlapCapsule ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, int layerMask, float minDepth ) : Collider2D
OverlapCapsuleAll ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle ) : Collider2D[]
OverlapCapsuleAll ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, int layerMask ) : Collider2D[]
OverlapCapsuleAll ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, int layerMask, float minDepth ) : Collider2D[]
OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results ) : int
OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results, int layerMask ) : int
OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results, int layerMask, float minDepth ) : int
OverlapCircle ( Vector2 point, float radius ) : Collider2D
OverlapCircle ( Vector2 point, float radius, int layerMask ) : Collider2D
OverlapCircle ( Vector2 point, float radius, int layerMask, float minDepth ) : Collider2D
OverlapCircleAll ( Vector2 point, float radius ) : Collider2D[]
OverlapCircleAll ( Vector2 point, float radius, int layerMask ) : Collider2D[]
OverlapCircleAll ( Vector2 point, float radius, int layerMask, float minDepth ) : Collider2D[]
OverlapCircleNonAlloc ( Vector2 point, float radius, Collider2D results ) : int
OverlapCircleNonAlloc ( Vector2 point, float radius, Collider2D results, int layerMask ) : int
OverlapCircleNonAlloc ( Vector2 point, float radius, Collider2D results, int layerMask, float minDepth ) : int
OverlapPoint ( Vector2 point ) : Collider2D
OverlapPoint ( Vector2 point, int layerMask ) : Collider2D
OverlapPoint ( Vector2 point, int layerMask, float minDepth ) : Collider2D
OverlapPointAll ( Vector2 point ) : Collider2D[]
OverlapPointAll ( Vector2 point, int layerMask ) : Collider2D[]
OverlapPointAll ( Vector2 point, int layerMask, float minDepth ) : Collider2D[]
OverlapPointNonAlloc ( Vector2 point, Collider2D results ) : int
OverlapPointNonAlloc ( Vector2 point, Collider2D results, int layerMask ) : int
OverlapPointNonAlloc ( Vector2 point, Collider2D results, int layerMask, float minDepth ) : int
Raycast ( Vector2 origin, Vector2 direction ) : RaycastHit2D
Raycast ( Vector2 origin, Vector2 direction, float distance ) : RaycastHit2D
Raycast ( Vector2 origin, Vector2 direction, float distance, int layerMask ) : RaycastHit2D
Raycast ( Vector2 origin, Vector2 direction, float distance, int layerMask, float minDepth ) : RaycastHit2D
RaycastAll ( Vector2 origin, Vector2 direction ) : RaycastHit2D[]
RaycastAll ( Vector2 origin, Vector2 direction, float distance ) : RaycastHit2D[]
RaycastAll ( Vector2 origin, Vector2 direction, float distance, int layerMask ) : RaycastHit2D[]
RaycastAll ( Vector2 origin, Vector2 direction, float distance, int layerMask, float minDepth ) : RaycastHit2D[]
RaycastNonAlloc ( Vector2 origin, Vector2 direction, RaycastHit2D results ) : int
RaycastNonAlloc ( Vector2 origin, Vector2 direction, RaycastHit2D results, float distance ) : int
RaycastNonAlloc ( Vector2 origin, Vector2 direction, RaycastHit2D results, float distance, int layerMask ) : int
RaycastNonAlloc ( Vector2 origin, Vector2 direction, RaycastHit2D results, float distance, int layerMask, float minDepth ) : int
SetEditorDragMovement ( bool dragging, GameObject objs ) : void
SetLayerCollisionMask ( int layer, int layerMask ) : void

Method Details

BoxCast() public static method

Casts a box against colliders in the scene, returning the first collider to contact with it.

public static BoxCast ( Vector2 origin, Vector2 size, float angle, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D
origin Vector2 The point in 2D space where the shape originates.
size Vector2 The size of the shape.
angle float The angle of the shape (in degrees).
direction Vector2 Vector representing the direction of the shape.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain 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 RaycastHit2D

BoxCastAll() public static method

Casts a box against colliders in the scene, returning all colliders that contact with it.

public static BoxCastAll ( Vector2 origin, Vector2 size, float angle, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : UnityEngine.RaycastHit2D[]
origin Vector2 The point in 2D space where the shape originates.
size Vector2 The size of the shape.
angle float The angle of the shape (in degrees).
direction Vector2 Vector representing the direction of the shape.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain 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 UnityEngine.RaycastHit2D[]

BoxCastNonAlloc() public static method

Casts a box into the scene, returning colliders that contact with it into the provided results array.

public static BoxCastNonAlloc ( Vector2 origin, Vector2 size, float angle, Vector2 direction, RaycastHit2D results, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : int
origin Vector2 The point in 2D space where the shape originates.
size Vector2 The size of the shape.
angle float The angle of the shape (in degrees).
direction Vector2 Vector representing the direction of the shape.
results RaycastHit2D Array to receive results.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain 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 int

CapsuleCast() public static method

Casts a capsule against colliders in the scene, returning the first collider to contact with it.

public static CapsuleCast ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D
origin Vector2 The point in 2D space where the shape originates.
size Vector2 The size of the shape.
capsuleDirection CapsuleDirection2D The direction of the capsule.
angle float The angle of the shape (in degrees).
direction Vector2 Vector representing the direction to cast the shape.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return RaycastHit2D

CapsuleCastAll() public static method

Casts a capsule against colliders in the scene, returning all colliders that contact with it.

public static CapsuleCastAll ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : UnityEngine.RaycastHit2D[]
origin Vector2 The point in 2D space where the shape originates.
size Vector2 The size of the shape.
capsuleDirection CapsuleDirection2D The direction of the capsule.
angle float The angle of the shape (in degrees).
direction Vector2 Vector representing the direction to cast the shape.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return UnityEngine.RaycastHit2D[]

CapsuleCastNonAlloc() public static method

Casts a capsule into the scene, returning colliders that contact with it into the provided results array.

public static CapsuleCastNonAlloc ( Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, RaycastHit2D results, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : int
origin Vector2 The point in 2D space where the shape originates.
size Vector2 The size of the shape.
capsuleDirection CapsuleDirection2D The direction of the capsule.
angle float The angle of the shape (in degrees).
direction Vector2 Vector representing the direction to cast the shape.
results RaycastHit2D Array to receive results.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return int

CircleCast() public static method

Casts a circle against colliders in the scene, returning the first collider to contact with it.

public static CircleCast ( Vector2 origin, float radius, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D
origin Vector2 The point in 2D space where the shape originates.
radius float The radius of the shape.
direction Vector2 Vector representing the direction of the shape.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain 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 RaycastHit2D

CircleCastAll() public static method

Casts a circle against colliders in the scene, returning all colliders that contact with it.

public static CircleCastAll ( Vector2 origin, float radius, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : UnityEngine.RaycastHit2D[]
origin Vector2 The point in 2D space where the shape originates.
radius float The radius of the shape.
direction Vector2 Vector representing the direction of the shape.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain 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 UnityEngine.RaycastHit2D[]

CircleCastNonAlloc() public static method

Casts a circle into the scene, returning colliders that contact with it into the provided results array.

public static CircleCastNonAlloc ( Vector2 origin, float radius, Vector2 direction, RaycastHit2D results, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : int
origin Vector2 The point in 2D space where the shape originates.
radius float The radius of the shape.
direction Vector2 Vector representing the direction of the shape.
results RaycastHit2D Array to receive results.
distance [ Maximum distance over which to cast the shape.
layerMask [ Filter to detect Colliders only on certain 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 int

GetRayIntersection() public static method

Cast a 3D ray against the colliders in the scene returning the first collider along the ray.

public static GetRayIntersection ( Ray ray, [ distance, [ layerMask ) : RaycastHit2D
ray Ray The 3D ray defining origin and direction to test.
distance [ Maximum distance over which to cast the ray.
layerMask [ Filter to detect colliders only on certain layers.
return RaycastHit2D

GetRayIntersectionNonAlloc() public static method

Cast a 3D ray against the colliders in the scene returning the colliders along the ray.

public static GetRayIntersectionNonAlloc ( Ray ray, RaycastHit2D results, [ distance, [ layerMask ) : int
ray Ray The 3D ray defining origin and direction to test.
results RaycastHit2D Array to receive results.
distance [ Maximum distance over which to cast the ray.
layerMask [ Filter to detect colliders only on certain layers.
return int

Linecast() public static method

Casts a line against colliders in the scene.

public static Linecast ( Vector2 start, Vector2 end, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D
start Vector2 The start point of the line in world space.
end Vector2 The end point of the line in world space.
layerMask [ Filter to detect Colliders only on certain 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 RaycastHit2D

LinecastAll() public static method

Casts a line against colliders in the scene.

public static LinecastAll ( Vector2 start, Vector2 end, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D[]
start Vector2 The start point of the line in world space.
end Vector2 The end point of the line in world space.
layerMask [ Filter to detect Colliders only on certain 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 RaycastHit2D[]

LinecastNonAlloc() public static method

Casts a line against colliders in the scene.

public static LinecastNonAlloc ( Vector2 start, Vector2 end, RaycastHit2D results, [ layerMask, [ minDepth, [ maxDepth ) : int
start Vector2 The start point of the line in world space.
end Vector2 The end point of the line in world space.
results RaycastHit2D Returned array of objects that intersect the line.
layerMask [ Filter to detect Colliders only on certain 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 int

OverlapArea() public static method

Check if a collider falls within a rectangular area.

public static OverlapArea ( 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

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[]

OverlapAreaNonAlloc() public static method

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

public static OverlapAreaNonAlloc ( Vector2 pointA, Vector2 pointB, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int
pointA Vector2 One corner of the rectangle.
pointB Vector2 Diagonally opposite corner of the rectangle.
results Collider2D Array to receive results.
layerMask [ Filter to check objects only on specified 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 int

OverlapBox() public static method

Check if a collider falls within a box area.

public static OverlapBox ( Vector2 point, Vector2 size, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D
point Vector2 Center of the box.
size Vector2 Size of the box.
angle float Angle of the box.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return Collider2D

OverlapBoxAll() public static method

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

public static OverlapBoxAll ( Vector2 point, Vector2 size, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]
point Vector2 Center of the box.
size Vector2 Size of the box.
angle float Angle of the box.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return Collider2D[]

OverlapBoxNonAlloc() public static method

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

public static OverlapBoxNonAlloc ( Vector2 point, Vector2 size, float angle, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int
point Vector2 Center of the box.
size Vector2 Size of the box.
angle float Angle of the box.
results Collider2D Array to receive results.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return int

OverlapCapsule() public static method

Check if a collider falls within a capsule area.

public static OverlapCapsule ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D
point Vector2 Center of the capsule.
size Vector2 Size of the capsule.
direction CapsuleDirection2D The direction of the capsule.
angle float Angle of the capsule.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return Collider2D

OverlapCapsuleAll() public static method

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

public static OverlapCapsuleAll ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]
point Vector2 Center of the capsule.
size Vector2 Size of the capsule.
direction CapsuleDirection2D The direction of the capsule.
angle float Angle of the capsule.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return Collider2D[]

OverlapCapsuleNonAlloc() public static method

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

public static OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int
point Vector2 Center of the capsule.
size Vector2 Size of the capsule.
direction CapsuleDirection2D The direction of the capsule.
angle float Angle of the capsule.
results Collider2D Array to receive results.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return int

OverlapCircle() public static method

Check if a collider falls within a circular area.

public static OverlapCircle ( Vector2 point, float radius, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D
point Vector2 Centre of the circle.
radius float Radius of the circle.
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

OverlapCircleAll() public static method

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

public static OverlapCircleAll ( Vector2 point, float radius, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]
point Vector2 Center of the circle.
radius float Radius of the circle.
layerMask [ Filter to check objects only on specified 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[]

OverlapCircleNonAlloc() public static method

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

public static OverlapCircleNonAlloc ( Vector2 point, float radius, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int
point Vector2 Center of the circle.
radius float Radius of the circle.
results Collider2D Array to receive results.
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 int

OverlapPoint() public static method

Check if a collider overlaps a point in space.

public static OverlapPoint ( Vector2 point, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D
point Vector2 A point in world space.
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

OverlapPointAll() public static method

Get a list of all colliders that overlap a point in space.

public static OverlapPointAll ( Vector2 point, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D[]
point Vector2 A point in space.
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[]

OverlapPointNonAlloc() public static method

Get a list of all colliders that overlap a point in space.

public static OverlapPointNonAlloc ( Vector2 point, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int
point Vector2 A point in space.
results Collider2D Array to receive results.
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 int

Raycast() public static method

Casts a ray against colliders in the scene.

public static Raycast ( Vector2 origin, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D
origin Vector2 The point in 2D space where the ray originates.
direction Vector2 Vector representing the direction of the ray.
distance [ Maximum distance over which to cast the ray.
layerMask [ Filter to detect Colliders only on certain 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 RaycastHit2D

RaycastAll() public static method

Casts a ray against colliders in the scene, returning all colliders that contact with it.

public static RaycastAll ( Vector2 origin, Vector2 direction, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : RaycastHit2D[]
origin Vector2 The point in 2D space where the ray originates.
direction Vector2 Vector representing the direction of the ray.
distance [ Maximum distance over which to cast the ray.
layerMask [ Filter to detect Colliders only on certain 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 RaycastHit2D[]

RaycastNonAlloc() public static method

Casts a ray into the scene.

public static RaycastNonAlloc ( Vector2 origin, Vector2 direction, RaycastHit2D results, [ distance, [ layerMask, [ minDepth, [ maxDepth ) : int
origin Vector2 The point in 2D space where the ray originates.
direction Vector2 Vector representing the direction of the ray.
results RaycastHit2D Array to receive results.
distance [ Maximum distance over which to cast the ray.
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 int