diff --git a/X10D.Unity/src/DebugUtility/DebugUtility.Polygon.cs b/X10D.Unity/src/DebugUtility/DebugUtility.Polygon.cs index f12088c..1e0fa9f 100644 --- a/X10D.Unity/src/DebugUtility/DebugUtility.Polygon.cs +++ b/X10D.Unity/src/DebugUtility/DebugUtility.Polygon.cs @@ -206,8 +206,14 @@ public static partial class DebugUtility /// if depth test should be applied; otherwise, . Passing /// will have the box be obscured by objects closer to the camera. /// + /// is . public static void DrawPolygon(PolygonF polygon, in Vector3 offset, in Color color, float duration, bool depthTest) { + if (polygon is null) + { + throw new ArgumentNullException(nameof(polygon)); + } + IReadOnlyList points = polygon.Vertices; if (points.Count < 2) { diff --git a/X10D.Unity/src/DebugUtility/DebugUtility.Polyhedron.cs b/X10D.Unity/src/DebugUtility/DebugUtility.Polyhedron.cs index 510dbf2..7ab51a0 100644 --- a/X10D.Unity/src/DebugUtility/DebugUtility.Polyhedron.cs +++ b/X10D.Unity/src/DebugUtility/DebugUtility.Polyhedron.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using X10D.Drawing; using X10D.Unity.Numerics; @@ -103,8 +103,14 @@ public static partial class DebugUtility /// if depth test should be applied; otherwise, . Passing /// will have the box be obscured by objects closer to the camera. /// + /// is . public static void DrawPolyhedron(Polyhedron polyhedron, in Vector3 offset, in Color color, float duration, bool depthTest) { + if (polyhedron is null) + { + throw new ArgumentNullException(nameof(polyhedron)); + } + IReadOnlyList points = polyhedron.Vertices; if (points.Count < 2) {