Collider for 2D physics representing an axis-aligned rectangle.
See Also: CircleCollider2D, PolygonCollider2D, EdgeCollider2D.
| size | The width and height of the rectangle. | 
| enabled | Enabled Behaviours are Updated, disabled Behaviours are not. | 
| isActiveAndEnabled | Has the Behaviour had enabled called. | 
| attachedRigidbody | The Rigidbody2D attached to the Collider2D's GameObject. | 
| bounds | The world space bounding area of the collider. | 
| density | The density of the collider used to calculate its mass (when auto mass is enabled). | 
| isTrigger | Is this collider configured as a trigger? | 
| offset | The local offset of the collider geometry. | 
| shapeCount | The number of separate shaped regions in the collider. | 
| sharedMaterial | The [[PhysicsMaterial2D that is applied to this collider. | 
| usedByEffector | Whether the collider is used by an attached effector or not. | 
| gameObject | The game object this component is attached to. A component is always attached to a game object. | 
| tag | The tag of this game object. | 
| transform | The Transform attached to this GameObject. | 
| hideFlags | Should the object be hidden, saved with the scene or modifiable by the user? | 
| name | The name of the object. | 
| IsTouching | Check whether this collider is touching the collider or not. | 
| IsTouchingLayers | Checks whether this collider is touching any colliders on the specified layerMask or not. | 
| OverlapPoint | Check if a collider overlaps a point in space. | 
| BroadcastMessage | Calls the method named methodName on every MonoBehaviour in this game object or any of its children. | 
| CompareTag | Is this game object tagged with tag ? | 
| GetComponent | Returns the component of Type type if the game object has one attached, null if it doesn't. | 
| GetComponentInChildren | Returns the component of Type type in the GameObject or any of its children using depth first search. | 
| GetComponentInParent | Returns the component of Type type in the GameObject or any of its parents. | 
| GetComponents | Returns all components of Type type in the GameObject. | 
| GetComponentsInChildren | Returns all components of Type type in the GameObject or any of its children. | 
| GetComponentsInParent | Returns all components of Type type in the GameObject or any of its parents. | 
| SendMessage | Calls the method named methodName on every MonoBehaviour in this game object. | 
| SendMessageUpwards | Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. | 
| GetInstanceID | Returns the instance id of the object. | 
| ToString | Returns the name of the game object. | 
| Destroy | Removes a gameobject, component or asset. | 
| DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. | 
| DontDestroyOnLoad | Makes the object target not be destroyed automatically when loading a new scene. | 
| FindObjectOfType | Returns the first active loaded object of Type type. | 
| FindObjectsOfType | Returns a list of all active loaded objects of Type type. | 
| Instantiate | Returns a copy of the object original. | 
| bool | Does the object exist? | 
| operator != | Compares if two objects refer to a different object. | 
| operator == | Compares two object references to see if they refer to the same object. | 
| OnCollisionEnter2D | Sent when an incoming collider makes contact with this object's collider (2D physics only). | 
| OnCollisionExit2D | Sent when a collider on another object stops touching this object's collider (2D physics only). | 
| OnCollisionStay2D | Sent each frame where a collider on another object is touching this object's collider (2D physics only). | 
| OnTriggerEnter2D | Sent when another object enters a trigger collider attached to this object (2D physics only). | 
| OnTriggerExit2D | Sent when another object leaves a trigger collider attached to this object (2D physics only). | 
| OnTriggerStay2D | Sent each frame where another object is within a trigger collider attached to this object (2D physics only). |