ALINE is a complete replacement for Unity's built-in Debug.Draw and Gizmo drawing functionality and much more.
It is faster, has more features and has better rendering quality.
Draw boxes, spheres, cylinders, arcs, bezier curves and many other things easily with minimal code.
ALINE is used by the A* Pathfinding Project - the most popular AI package in the Asset Store for years - to draw gizmos with high performance and quality.
Avoid having to deal with Unity's multiple and incompatible APIs for drawing. The ALINE package uses a single full-featured API everywhere.
Have you ever wanted to draw debug lines from inside ECS or the Unity Job System? Now you can! You can draw everything from inside jobs, even when compiled with Burst and in parallel using IJobForEach.
In the video you can see 10000 boxes drawn each frame from a burst job at several hundred fps.
The API can be easily used in a standalone game as well. This can be very useful if you for example have a custom level editor in your game, or if you are going for a sci-fi look and need pixel-perfect anti-aliased lines.
You get the same high performance and ease of use as in the editor.
This package often outperforms Unity's APIs significantly.
Make sure all those debug lines do not slow down the development of your game!
The plot shows a benchmark in which 10000 random lines were drawn each frame with random colors.
var a = new Vector3(0, 0, 0);
var b = new Vector3(1, 1, 1);
// Draw a line from a to b
Draw.Line(a, b, Color.red);
// Draw a blue wire box with a size of 1
Draw.WireBox(a, Quaternion.identity, 1, Color.blue);
// Draw all enclosed commands relative to the given object
using(Draw.InLocalSpace(transform)) {
// Draw a white cylinder at the transform's pivot
// with a height of 2 and a radius of 0.5
Draw.WireCylinder(Vector3.zero, Vector3.up, 2, 0.5f);
}
To the left you can see an example of how the API can be used.
Where possible the API has been kept similar to Unity's existing APIs to make it easy to migrate. The API is follows a predictable and consistent naming scheme and all commands have the same overloads (e.g. you can always add a color parameter at the end of a function call to draw using that color).