Updated Points to always be an array of 1 when set to nothing.

Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/295
pull/413/head
Simon Jackson 2022-12-18 18:09:58 +00:00
parent c08a91f421
commit 00b67b7046
1 changed files with 12 additions and 4 deletions

View File

@ -111,10 +111,18 @@ namespace UnityEngine.UI.Extensions
set set
{ {
if (m_points == value) if (m_points == value) return;
return;
m_points = value; if (value == null || value.Length == 0)
SetAllDirty(); {
m_points = new Vector2[1];
}
else
{
m_points = value;
}
SetAllDirty();
} }
} }