diff --git a/Runtime/Scripts/Primitives/UILineRenderer.cs b/Runtime/Scripts/Primitives/UILineRenderer.cs index 6f2f093..d3b5d3d 100644 --- a/Runtime/Scripts/Primitives/UILineRenderer.cs +++ b/Runtime/Scripts/Primitives/UILineRenderer.cs @@ -111,10 +111,18 @@ namespace UnityEngine.UI.Extensions set { - if (m_points == value) - return; - m_points = value; - SetAllDirty(); + if (m_points == value) return; + + if (value == null || value.Length == 0) + { + m_points = new Vector2[1]; + } + else + { + m_points = value; + } + + SetAllDirty(); } }