using UnityEngine; namespace DebugDrawEx { public class LineMonoBehaviour : MonoBehaviour { public Color Color { get; set; } public Vector3 Point1 { get; set; } public Vector3 Point2 { get; set; } public float Duration { get; set; } public bool DepthTest { get; set; } private void Update() { Duration -= Time.unscaledDeltaTime; if (Duration <= 0) Destroy(gameObject); DebugDraw.DrawLine(Point1, Point2, Color, 0, DepthTest); } } }