# DrawGeometry

> Draw the specified Circle Geometry. This is only used in the Unity Editor or in a Development Player. See CircleGeometry.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule

## DrawGeometry(CircleGeometry, PhysicsTransform, Color, float, DrawFillOptions)

Draw the specified Circle Geometry. This is only used in the Unity Editor or in a Development Player.

See [CircleGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/circlegeometry.md).

```csharp
public void DrawGeometry(CircleGeometry geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)
```

### Parameters

**** (\[CircleGeometry]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/circlegeometry)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.3/script-reference/unityengine/color)): The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.**** (\[DrawFillOptions]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

## DrawGeometry(ReadOnlySpan\<CircleGeometry>, PhysicsTransform, Color, float, DrawFillOptions)

Draw the specified span of Circle Geometry. This is only used in the Unity Editor or in a Development Player. See [CircleGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/circlegeometry.md).

```csharp
public void DrawGeometry(ReadOnlySpan<CircleGeometry> geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)
```

### Parameters

**** (\[ReadOnlySpan\<CircleGeometry>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.3/script-reference/unityengine/color)): The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.**** (\[DrawFillOptions]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

## DrawGeometry(CapsuleGeometry, PhysicsTransform, Color, float, DrawFillOptions)

Draw the specified Capsule geometry. This is only used in the Unity Editor or in a Development Player.

See [CapsuleGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/capsulegeometry.md).

```csharp
public void DrawGeometry(CapsuleGeometry geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)
```

### Parameters

**** (\[CapsuleGeometry]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/capsulegeometry)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.3/script-reference/unityengine/color)): The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.**** (\[DrawFillOptions]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

## DrawGeometry(ReadOnlySpan\<CapsuleGeometry>, PhysicsTransform, Color, float, DrawFillOptions)

Draw the specified span of Capsule geometry. This is only used in the Unity Editor or in a Development Player.

See [CapsuleGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/capsulegeometry.md).

```csharp
public void DrawGeometry(ReadOnlySpan<CapsuleGeometry> geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)
```

### Parameters

**** (\[ReadOnlySpan\<CapsuleGeometry>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.3/script-reference/unityengine/color)): The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.**** (\[DrawFillOptions]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

## DrawGeometry(PolygonGeometry, PhysicsTransform, Color, float, DrawFillOptions)

Draw the specified Polygon geometry. This is only used in the Unity Editor or in a Development Player.

See [PolygonGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/polygongeometry.md).

```csharp
public void DrawGeometry(PolygonGeometry geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)
```

### Parameters

**** (\[PolygonGeometry]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/polygongeometry)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.3/script-reference/unityengine/color)): The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.**** (\[DrawFillOptions]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

## DrawGeometry(ReadOnlySpan\<PolygonGeometry>, PhysicsTransform, Color, float, DrawFillOptions)

Draw the specified span of Polygon geometry. This is only used in the Unity Editor or in a Development Player.

See [PolygonGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/polygongeometry.md).

```csharp
public void DrawGeometry(ReadOnlySpan<PolygonGeometry> geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)
```

### Parameters

**** (\[ReadOnlySpan\<PolygonGeometry>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.3/script-reference/unityengine/color)): The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.**** (\[DrawFillOptions]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

## DrawGeometry(SegmentGeometry, PhysicsTransform, Color, float)

Draw the specified Segment geometry. This is only used in the Unity Editor or in a Development Player.

See [SegmentGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/segmentgeometry.md).

```csharp
public void DrawGeometry(SegmentGeometry geometry, PhysicsTransform transform, Color color, float lifetime = 0)
```

### Parameters

**** (\[SegmentGeometry]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/segmentgeometry)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.3/script-reference/unityengine/color)): The color to draw with.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.

## DrawGeometry(ReadOnlySpan\<SegmentGeometry>, PhysicsTransform, Color, float)

Draw the specified span Segment geometry. This is only used in the Unity Editor or in a Development Player.

See [SegmentGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/segmentgeometry.md).

```csharp
public void DrawGeometry(ReadOnlySpan<SegmentGeometry> geometry, PhysicsTransform transform, Color color, float lifetime = 0)
```

### Parameters

**** (\[ReadOnlySpan\<SegmentGeometry>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.3/script-reference/unityengine/color)): The color to draw with.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.
