예제 #1
0
 public static void bounds(Bounds bounds, Color color, Color?crossLineColor = null, float duration = 0)
 {
     if (crossLineColor != null)
     {
         Debug.DrawLine(bounds.min, bounds.max, (Color)crossLineColor, duration);
     }
     DebugDrawer.box(bounds.center, bounds.extents, color, duration);
 }
예제 #2
0
 public static void box(Vector3 center, Vector3 size, Color color, float duration = 0)
 {
     DebugDrawer.plane(new Vector3(center.x, center.y + size.y, center.z), size, color, duration);
     DebugDrawer.plane(new Vector3(center.x, center.y - size.y, center.z), size, color, duration);
     Debug.DrawLine(new Vector3(center.x + size.x, center.y - size.y, center.z + size.z), new Vector3(center.x + size.x, center.y + size.y, center.z + size.z), color, duration);
     Debug.DrawLine(new Vector3(center.x - size.x, center.y - size.y, center.z + size.z), new Vector3(center.x - size.x, center.y + size.y, center.z + size.z), color, duration);
     Debug.DrawLine(new Vector3(center.x + size.x, center.y - size.y, center.z - size.z), new Vector3(center.x + size.x, center.y + size.y, center.z - size.z), color, duration);
     Debug.DrawLine(new Vector3(center.x - size.x, center.y - size.y, center.z - size.z), new Vector3(center.x - size.x, center.y + size.y, center.z - size.z), color, duration);
 }