Using Aline draw commands when the game isn't playing


I’d like to use the regular draw commands both in game and in edit mode, similar to how you can with regular Debug.DrawLine.

It works, but it flickers, I’m assuming because the Update method is not called as frequently in edit mode. Is there a way?

public class AlineTester : MonoBehaviour
    public Transform from;
    public Transform to;

    [ColorUsage(true, true)]
    public Color color =;
    void Update () {
        var position2 = to.position;
        var position1 = from.position;
        Debug.DrawLine(position1, position2, color); // works
        Draw.Line(position1, position2, color); // works but flickers


If you draw from within the DrawGizmos callback, then everything will work properly. The Update method on the other hand is not necessarily synced to when the cameras render, and ALINE cannot get enough info from Unity to work around it.

See Get Started With ALINE - ALINE