Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DrawGeometry

Draw the specified Circle Geometry. This is only used in the Unity Editor or in a Development Player. See CircleGeometry.
Read time 5 minutesLast updated 10 days ago

Definition

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

Draw the specified Circle Geometry. This is only used in the Unity Editor or in a Development Player.
public void DrawGeometry(CircleGeometry geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)

Parameters

The geometry to draw.

The transform to use on the specified geometry.

color

The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.

lifetime

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

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.
public void DrawGeometry(ReadOnlySpan<CircleGeometry> geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)

Parameters

The geometry to draw.

The transform to use on the specified geometry.

color

The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.

lifetime

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

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.
public void DrawGeometry(CapsuleGeometry geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)

Parameters

The geometry to draw.

The transform to use on the specified geometry.

color

The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.

lifetime

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

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.
public void DrawGeometry(ReadOnlySpan<CapsuleGeometry> geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)

Parameters

The geometry to draw.

The transform to use on the specified geometry.

color

The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.

lifetime

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

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.
public void DrawGeometry(PolygonGeometry geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)

Parameters

The geometry to draw.

The transform to use on the specified geometry.

color

The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.

lifetime

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

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.
public void DrawGeometry(ReadOnlySpan<PolygonGeometry> geometry, PhysicsTransform transform, Color color, float lifetime = 0, PhysicsWorld.DrawFillOptions drawFillOptions = DrawFillOptions.All)

Parameters

The geometry to draw.

The transform to use on the specified geometry.

color

The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.

lifetime

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

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.
public void DrawGeometry(SegmentGeometry geometry, PhysicsTransform transform, Color color, float lifetime = 0)

Parameters

The geometry to draw.

The transform to use on the specified geometry.

color

The color to draw with.

lifetime

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.
public void DrawGeometry(ReadOnlySpan<SegmentGeometry> geometry, PhysicsTransform transform, Color color, float lifetime = 0)

Parameters

The geometry to draw.

The transform to use on the specified geometry.

color

The color to draw with.

lifetime

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.