You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
573 B
22 lines
573 B
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);
|
|
}
|
|
}
|
|
}
|