Table of Contents

Class Draw

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

A utility class for drawing debug lines, shapes, and bounds for players or globally.

public static class Draw
Inheritance
Draw
Inherited Members

Methods

Bounds(Bounds, Color, float, IEnumerable<Player>)

public static void Bounds(Bounds bounds, Color color, float duration, IEnumerable<Player> players = null)

Parameters

bounds Bounds

The Bounds(Bounds, Color, float, IEnumerable<Player>) object to visualize.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the bounds to.

Box(Vector3, Vector3, Quaternion, Color, float, IEnumerable<Player>)

Draws a box using exact dimensions.

public static void Box(Vector3 center, Vector3 size, Quaternion rotation, Color color, float duration, IEnumerable<Player> players = null)

Parameters

center Vector3

The center point of the box.

size Vector3

The size of the box.

rotation Quaternion

The rotation of the box.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the sphere to.

Capsule(Vector3, Quaternion, float, float, Vector3, Color, float, IEnumerable<Player>)

Draws a wireframe capsule.

public static void Capsule(Vector3 center, Quaternion rotation, float height, float radius, Vector3 scale, Color color, float duration, IEnumerable<Player> players = null)

Parameters

center Vector3

The center point of the capsule.

rotation Quaternion

The rotation of the capsule.

height float

The height of the capsule.

radius float

The radius of the capsule.

scale Vector3

The scale of the capsule.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the capsule to.

Circle(Vector3, Quaternion, Vector3, Color, float, IEnumerable<Player>, bool, int)

Draws a circle at a specific position.

public static void Circle(Vector3 origin, Quaternion rotation, Vector3 scale, Color color, float duration, IEnumerable<Player> players = null, bool horizontal = true, int segments = 16)

Parameters

origin Vector3

The center point of the circle.

rotation Quaternion

The rotation of the circle.

scale Vector3

The scale of the circle.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the circle to.

horizontal bool

Indicates whether the circle should be drawn on the horizontal plane (XZ) or vertical plane (XY).

segments int

The number of line segments used to draw the circle. Higher values result in a smoother circle.

Collider(Collider, Color, float, IEnumerable<Player>)

Draws a collider.

public static void Collider(Collider collider, Color color, float duration, IEnumerable<Player> players = null)

Parameters

collider Collider

The UnityEngine.BoxCollider object to visualize.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the bounds to.

Line(Vector3, Vector3, Color, float, IEnumerable<Player>)

Draws a line between two specified points.

public static void Line(Vector3 start, Vector3 end, Color color, float duration, IEnumerable<Player> players = null)

Parameters

start Vector3

The starting position of the line.

end Vector3

The ending position of the line.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the line to.

Mesh(Mesh, Transform, Color, float, IEnumerable<Player>)

Draws a wireframe mesh.

public static void Mesh(Mesh mesh, Transform transform, Color color, float duration, IEnumerable<Player> players = null)

Parameters

mesh Mesh

The Mesh(Mesh, Transform, Color, float, IEnumerable<Player>) to visualize.

transform Transform

The Transform of the mesh.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the capsule to.

Path(Vector3[], Color, float, IEnumerable<Player>)

Draws a connected path through a series of points.

public static void Path(Vector3[] points, Color color, float duration, IEnumerable<Player> players = null)

Parameters

points Vector3[]

An array of UnityEngine.Vector3 points to connect sequentially.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the path to.

RelativeBounds(RelativeBounds, Color, float, IEnumerable<Player>)

public static void RelativeBounds(RelativeBounds relativeBounds, Color color, float duration, IEnumerable<Player> players = null)

Parameters

relativeBounds RelativeBounds

The RelativeBounds(RelativeBounds, Color, float, IEnumerable<Player>) object to visualize.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the bounds to.

Sphere(Vector3, Quaternion, Vector3, Color, float, IEnumerable<Player>, int)

Draws a wireframe sphere composed of two circles (horizontal and vertical).

public static void Sphere(Vector3 origin, Quaternion rotation, Vector3 scale, Color color, float duration, IEnumerable<Player> players = null, int segments = 16)

Parameters

origin Vector3

The center point of the sphere.

rotation Quaternion

The rotation of the sphere.

scale Vector3

The scale of the sphere.

color Color

The color of the lines.

duration float

How long the line should remain visible.

Warning: Avoid using PositiveInfinity or extremely large values, as these lines cannot be removed from the client once sent.

players IEnumerable<Player>

A collection of Players to show the sphere to.

segments int

The number of segments for the circles. Higher values result in a smoother sphere.