UnityEngineBoxCollider2D
API reference for UnityEngineBoxCollider2D.
Properties
| Property | Type | Access |
|---|---|---|
| attachedRigidbody | UnityEngineRigidbody2D | get |
| autoTiling | bool | get, set |
| bounciness | float | get |
| bounds | UnityEngineBounds | get |
| callbackLayers | UnityEngineLayerMask | get, set |
| composite | UnityEngineCompositeCollider2D | get |
| contactCaptureLayers | UnityEngineLayerMask | get, set |
| density | float | get, set |
| edgeRadius | float | get, set |
| enabled | bool | get, set |
| errorState | UnityEngineColliderErrorState2D | get |
| excludeLayers | UnityEngineLayerMask | get, set |
| forceReceiveLayers | UnityEngineLayerMask | get, set |
| forceSendLayers | UnityEngineLayerMask | get, set |
| friction | float | get |
| gameObject | GameObject | get |
| includeLayers | UnityEngineLayerMask | get, set |
| isTrigger | bool | get, set |
| layerOverridePriority | int | get, set |
| name | string | get, set |
| offset | Vector2 | get, set |
| shapeCount | int | get |
| sharedMaterial | UnityEnginePhysicsMaterial2D | get, set |
| size | Vector2 | get, set |
| transform | Transform | get |
| usedByComposite | bool | get, set |
| usedByEffector | bool | get, set |
Methods
Cast
Cast(direction: Vector2, contactFilter: UnityEngineContactFilter2D, results: SystemCollectionsGenericList`1[[UnityEngineRaycastHit2D, UnityEnginePhysics2DModule, Version=0000, Culture=neutral, PublicKeyToken=null]], distance: float, ignoreSiblingColliders: bool) -> intCast(direction: Vector2, contactFilter: UnityEngineContactFilter2D, results: UnityEngineRaycastHit2D[], distance: float, ignoreSiblingColliders: bool) -> intCast(direction: Vector2, contactFilter: UnityEngineContactFilter2D, results: UnityEngineRaycastHit2D[], distance: float) -> intCast(direction: Vector2, contactFilter: UnityEngineContactFilter2D, results: UnityEngineRaycastHit2D[]) -> intCast(direction: Vector2, results: UnityEngineRaycastHit2D[], distance: float, ignoreSiblingColliders: bool) -> intCast(direction: Vector2, results: UnityEngineRaycastHit2D[], distance: float) -> intCast(direction: Vector2, results: UnityEngineRaycastHit2D[]) -> intClosestPoint
ClosestPoint(position: Vector2) -> Vector2CreateMesh
CreateMesh(useBodyPosition: bool, useBodyRotation: bool) -> UnityEngineMeshDistance
Distance(collider: UnityEngineCollider2D) -> UnityEngineColliderDistance2DEquals
Equals(other: object) -> boolGetComponent
GetComponent(type: string) -> UnityEngineComponentGetComponent(type: SystemType) -> UnityEngineComponentGetComponent(type: SystemType) -> UnityEngineObjectGetComponentInChildren
GetComponentInChildren(includeInactive: bool, type: SystemType) -> UnityEngineObjectGetComponentInChildren(t: SystemType, includeInactive: bool) -> UnityEngineComponentGetComponentInChildren(t: SystemType) -> UnityEngineComponentGetComponentInChildren(type: SystemType) -> UnityEngineObjectGetComponentInParent
GetComponentInParent(includeInactive: bool, type: SystemType) -> UnityEngineObjectGetComponentInParent(t: SystemType, includeInactive: bool) -> UnityEngineComponentGetComponentInParent(t: SystemType) -> UnityEngineComponentGetComponentInParent(type: SystemType) -> UnityEngineObjectGetComponents
GetComponents(results: SystemCollectionsGenericList`1[[UnityEngineObject, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]], type: SystemType) -> voidGetComponents(type: SystemType, results: SystemCollectionsGenericList`1[[UnityEngineComponent, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> voidGetComponents(type: SystemType) -> UnityEngineComponent[]GetComponents(type: SystemType) -> UnityEngineObject[]GetComponentsInChildren
GetComponentsInChildren(results: SystemCollectionsGenericList`1[[UnityEngineObject, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]], type: SystemType) -> voidGetComponentsInChildren(includeInactive: bool, result: SystemCollectionsGenericList`1[[UnityEngineObject, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> voidGetComponentsInChildren(includeInactive: bool, type: SystemType) -> UnityEngineObject[]GetComponentsInChildren(t: SystemType, includeInactive: bool) -> UnityEngineComponent[]GetComponentsInChildren(t: SystemType) -> UnityEngineComponent[]GetComponentsInChildren(type: SystemType) -> UnityEngineObject[]GetComponentsInParent
GetComponentsInParent(includeInactive: bool, results: SystemCollectionsGenericList`1[[UnityEngineObject, UnityEngineCoreModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> voidGetComponentsInParent(includeInactive: bool, type: SystemType) -> UnityEngineObject[]GetComponentsInParent(t: SystemType, includeInactive: bool) -> UnityEngineComponent[]GetComponentsInParent(t: SystemType) -> UnityEngineComponent[]GetComponentsInParent(type: SystemType) -> UnityEngineObject[]GetContacts
GetContacts(colliders: SystemCollectionsGenericList`1[[UnityEngineCollider2D, UnityEnginePhysics2DModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> intGetContacts(contacts: SystemCollectionsGenericList`1[[UnityEngineContactPoint2D, UnityEnginePhysics2DModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> intGetContacts(colliders: UnityEngineCollider2D[]) -> intGetContacts(contactFilter: UnityEngineContactFilter2D, colliders: SystemCollectionsGenericList`1[[UnityEngineCollider2D, UnityEnginePhysics2DModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> intGetContacts(contactFilter: UnityEngineContactFilter2D, contacts: SystemCollectionsGenericList`1[[UnityEngineContactPoint2D, UnityEnginePhysics2DModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> intGetContacts(contactFilter: UnityEngineContactFilter2D, colliders: UnityEngineCollider2D[]) -> intGetContacts(contactFilter: UnityEngineContactFilter2D, contacts: UnityEngineContactPoint2D[]) -> intGetContacts(contacts: UnityEngineContactPoint2D[]) -> intGetHashCode
GetHashCode() -> intGetInstanceID
GetInstanceID() -> intGetShapeHash
GetShapeHash() -> uintGetShapes
GetShapes(physicsShapeGroup: UnityEnginePhysicsShapeGroup2D, shapeIndex: int, shapeCount: int) -> intGetShapes(physicsShapeGroup: UnityEnginePhysicsShapeGroup2D) -> intGetType
GetType() -> SystemTypeIsTouching
IsTouching(collider: UnityEngineCollider2D, contactFilter: UnityEngineContactFilter2D) -> boolIsTouching(collider: UnityEngineCollider2D) -> boolIsTouching(contactFilter: UnityEngineContactFilter2D) -> boolIsTouchingLayers
IsTouchingLayers() -> boolIsTouchingLayers(layerMask: int) -> boolOverlapCollider
OverlapCollider(contactFilter: UnityEngineContactFilter2D, results: SystemCollectionsGenericList`1[[UnityEngineCollider2D, UnityEnginePhysics2DModule, Version=0000, Culture=neutral, PublicKeyToken=null]]) -> intOverlapCollider(contactFilter: UnityEngineContactFilter2D, results: UnityEngineCollider2D[]) -> intOverlapPoint
OverlapPoint(point: Vector2) -> boolRaycast
Raycast(direction: Vector2, contactFilter: UnityEngineContactFilter2D, results: SystemCollectionsGenericList`1[[UnityEngineRaycastHit2D, UnityEnginePhysics2DModule, Version=0000, Culture=neutral, PublicKeyToken=null]], distance: float) -> intRaycast(direction: Vector2, contactFilter: UnityEngineContactFilter2D, results: UnityEngineRaycastHit2D[], distance: float) -> intRaycast(direction: Vector2, contactFilter: UnityEngineContactFilter2D, results: UnityEngineRaycastHit2D[]) -> intRaycast(direction: Vector2, results: UnityEngineRaycastHit2D[], distance: float, layerMask: int, minDepth: float, maxDepth: float) -> intRaycast(direction: Vector2, results: UnityEngineRaycastHit2D[], distance: float, layerMask: int, minDepth: float) -> intRaycast(direction: Vector2, results: UnityEngineRaycastHit2D[], distance: float, layerMask: int) -> intRaycast(direction: Vector2, results: UnityEngineRaycastHit2D[], distance: float) -> intRaycast(direction: Vector2, results: UnityEngineRaycastHit2D[]) -> intToString
ToString() -> string