# DrawGeometry

> Draw the specified Circle Geometry.

## Definition

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

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

Draw the specified Circle Geometry.

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

### Parameters

**** (\[CircleGeometry]\(/engine/6000.5/script-reference/unity/u2d/physics/circlegeometry)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.5/script-reference/unity/u2d/physics/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.5/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.5/script-reference/unity/u2d/physics/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

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

Draw the specified span of Circle Geometry.

```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.5/script-reference/unity/u2d/physics/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.5/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.5/script-reference/unity/u2d/physics/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

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

Draw the specified Capsule geometry.

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

### Parameters

**** (\[CapsuleGeometry]\(/engine/6000.5/script-reference/unity/u2d/physics/capsulegeometry)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.5/script-reference/unity/u2d/physics/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.5/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.5/script-reference/unity/u2d/physics/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

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

Draw the specified span of Capsule geometry.

```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.5/script-reference/unity/u2d/physics/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.5/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.5/script-reference/unity/u2d/physics/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

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

Draw the specified Polygon geometry.

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

### Parameters

**** (\[PolygonGeometry]\(/engine/6000.5/script-reference/unity/u2d/physics/polygongeometry)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.5/script-reference/unity/u2d/physics/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.5/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.5/script-reference/unity/u2d/physics/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

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

Draw the specified span of Polygon geometry.

```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.5/script-reference/unity/u2d/physics/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.5/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.5/script-reference/unity/u2d/physics/physicsworld/drawfilloptions)): Controls what aspects of the primitive is drawn.

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

Draw the specified Segment geometry.

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

### Parameters

**** (\[SegmentGeometry]\(/engine/6000.5/script-reference/unity/u2d/physics/segmentgeometry)): The geometry to draw.**** (\[PhysicsTransform]\(/engine/6000.5/script-reference/unity/u2d/physics/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.5/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 of Segment geometry.

```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.5/script-reference/unity/u2d/physics/physicstransform)): The transform to use on the specified geometry.**** (\[Color]\(/engine/6000.5/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.
