修复背景组件初始化时报错的问题

This commit is contained in:
monitor1394
2020-06-01 12:38:59 +08:00
parent 2de64580ec
commit 5d5dc468c0

View File

@@ -258,6 +258,7 @@ namespace XCharts
private void InitBackground()
{
if (!transform.parent) return;
int childCount = transform.parent.childCount;
if (childCount > 2) m_Background.runtimeActive = false;
else if (childCount == 1) m_Background.runtimeActive = true;