The shape of a 2D gameobject is defined by the Collider 2D component. There are 6 types of 2D colliders associated with a gameobject in 2D physics. These colliders are
Circle Collider 2D(CircleCollider2D), Box Collider 2D(BoxCollider2D), Polygon Collider 2D(PolygonCollider2D), Edge Collider 2D(EdgeCollider2D), Capsule Collider 2D
(Capsule Collider 2D) and Composite Collider 2D(CompositeCollider2D). The Circle Collider 2D is used for round shapes. The Box Collider 2D is used for rectangular
shapes. The Polygon Collider 2D is used for shapes that have many sides(Egs, square, pentagon, hexagon etc). The Edge Collider 2D is used where the shape is not fixed.
The Capsule Collider 2D is used for gameobjects that have a capsule shape. The Composite collider 2D is used to make a…