# PhysicsShape.ShapeProxy

> A proxy of a shape in a generic form suited to representing all support shape types. You can provide between 1 and PhysicsConstants.MaxPolygonVertices and a radius. A CircleGeometry is a single point with a non-zero radius (zero radius is allowed however and defines a point). A CapsuleGeometry is two points with a non-zero radius. A PolygonGeometry box is the points with and an optional radius. A SegmentGeometry is two points with a zero radius. A ChainSegmentGeometry is two points with a zero radius. To create a proxy, simply provide the geometry to the constructor.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public struct PhysicsShape.ShapeProxy
```

## Constructors

| Constructor                                                                                                                                                                | Description                                            |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| [ShapeProxy(Unity.U2D.Physics.CapsuleGeometry)](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/ctor.md#shapeproxy\(capsulegeometry\))           | Create a shape proxy using the specified Capsule.      |
| [ShapeProxy(Unity.U2D.Physics.ChainSegmentGeometry)](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/ctor.md#shapeproxy\(chainsegmentgeometry\)) | Create a shape proxy using the specified ChainSegment. |
| [ShapeProxy(Unity.U2D.Physics.CircleGeometry)](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/ctor.md#shapeproxy\(circlegeometry\))             | Create a shape proxy using the specified Circle.       |
| [ShapeProxy(Unity.U2D.Physics.PolygonGeometry)](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/ctor.md#shapeproxy\(polygongeometry\))           | Create a shape proxy using the specified Polygon.      |
| [ShapeProxy(Unity.U2D.Physics.SegmentGeometry)](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/ctor.md#shapeproxy\(segmentgeometry\))           | Create a shape proxy using the specified Segment.      |
| [ShapeProxy(UnityEngine.Vector2)](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/ctor.md#shapeproxy\(vector2\))                                 | Create a shape proxy representing a single point.      |

## Properties

| Property                                                                                                        | Description                                                                                                                                                                                                                      |
| --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [aabb](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/aabb.md)                       | Get the AABB that bounds the shape proxy.                                                                                                                                                                                        |
| [capsuleGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/capsulegeometry.md) | Get a [CapsuleGeometry](/engine/6000.5/script-reference/unity/u2d/physics/capsulegeometry.md) from the shape proxy. The [\_count](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/count.md) must be 2. |
| [circleGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/circlegeometry.md)   | Get a [CircleGeometry](/engine/6000.5/script-reference/unity/u2d/physics/circlegeometry.md) from the shape proxy. The [\_count](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/count.md) must be 1.   |
| [count](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/count.md)                     | The number of vertices.                                                                                                                                                                                                          |
| [isValid](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/isvalid.md)                 | Check if the shape proxy is valid.                                                                                                                                                                                               |
| [polygonGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/polygongeometry.md) | Get a [PolygonGeometry](/engine/6000.5/script-reference/unity/u2d/physics/polygongeometry.md) from the shape proxy.                                                                                                              |
| [radius](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/radius.md)                   | The radius around the vertices.                                                                                                                                                                                                  |
| [segmentGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/segmentgeometry.md) | Get a [SegmentGeometry](/engine/6000.5/script-reference/unity/u2d/physics/segmentgeometry.md) from the shape proxy. The [\_count](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/count.md) must be 2. |
| [shapeType](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/shapetype.md)             | The shape type represented.                                                                                                                                                                                                      |
| [vertices](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/vertices.md)               | The shape vertices.                                                                                                                                                                                                              |

## Methods

| Method                                                                                        | Description                             |
| --------------------------------------------------------------------------------------------- | --------------------------------------- |
| [AsSpan](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy/asspan.md) | Get the convex-hull vertices as a span. |
