优化Background组件的生效条件,需要有单独的父节点

This commit is contained in:
monitor1394
2020-05-31 07:43:29 +08:00
parent 73919ab32a
commit 2de64580ec
12 changed files with 96 additions and 31 deletions

View File

@@ -413,7 +413,10 @@ namespace XCharts
if (fieldCount <= 1)
{
while (2 > data.arraySize)
{
data.InsertArrayElementAtIndex(data.arraySize);
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = 0;
}
SerializedProperty element = data.GetArrayElementAtIndex(1);
if (showSelected)
{
@@ -449,6 +452,7 @@ namespace XCharts
while (i > data.arraySize - 1)
{
data.InsertArrayElementAtIndex(data.arraySize);
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = 0;
}
drawRect.x = startX + i * xWid;
drawRect.width = dataWid + 40;