Debug.DrawLine
由于射线不可见, 所以测试时可以使用DrawLine绘制辅助线.
描述:在指定的起始点与结束点之间绘制一条直线
public static void DrawLine(
Vector3 start,
Vector3 end
);
public static void DrawLine(
Vector3 start,
Vector3 end,
Color color
);
public static void DrawLine(
Vector3 start,
Vector3 end,
Color color,
float duration
);
public static void DrawLine(
Vector3 start,
Vector3 end,
[Internal.DefaultValue("Color.white")] Color color,
[Internal.DefaultValue("0.0f")] float duration,
[Internal.DefaultValue("true")] bool depthTest
);
| star | 世界空间中的点作为该直线的起始点 |
| end | 世界空间中的点作为该直线的结束点 |
| color | 该直线的颜色 |
| duration | 该直线的可见长度应为多长 |
| depthTest | 该直线是否应被靠近此摄像机的对象遮挡 |