DrawGeometry
Draw the specified Circle Geometry.
Read time 4 minutesLast updated 11 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
DrawGeometry(CircleGeometry, PhysicsTransform, Color, float, DrawFillOptions)
Draw the specified Circle Geometry.
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.
The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.
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.
Controls what aspects of the primitive is drawn.
DrawGeometry(ReadOnlySpan<CircleGeometry>, PhysicsTransform, Color, float, DrawFillOptions)
Draw the specified span of Circle Geometry.
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.
The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.
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.
Controls what aspects of the primitive is drawn.
DrawGeometry(CapsuleGeometry, PhysicsTransform, Color, float, DrawFillOptions)
Draw the specified Capsule geometry.
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.
The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.
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.
Controls what aspects of the primitive is drawn.
DrawGeometry(ReadOnlySpan<CapsuleGeometry>, PhysicsTransform, Color, float, DrawFillOptions)
Draw the specified span of Capsule geometry.
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.
The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.
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.
Controls what aspects of the primitive is drawn.
DrawGeometry(PolygonGeometry, PhysicsTransform, Color, float, DrawFillOptions)
Draw the specified Polygon geometry.
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.
The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.
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.
Controls what aspects of the primitive is drawn.
DrawGeometry(ReadOnlySpan<PolygonGeometry>, PhysicsTransform, Color, float, DrawFillOptions)
Draw the specified span of Polygon geometry.
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.
The color to draw with. Here, the color alpha is used only for the interior fill color but will never be completely opaque.
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.
Controls what aspects of the primitive is drawn.
DrawGeometry(SegmentGeometry, PhysicsTransform, Color, float)
Draw the specified Segment geometry.
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.
The color to draw with.
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.
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.
The color to draw with.
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.