From 5d5dc468c06f70aa6a974e83436f4eac02d060b3 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Mon, 1 Jun 2020 12:38:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=83=8C=E6=99=AF=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Internal/BaseChart.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Runtime/Internal/BaseChart.cs b/Runtime/Internal/BaseChart.cs index eb2ecaf6..ae9b1048 100644 --- a/Runtime/Internal/BaseChart.cs +++ b/Runtime/Internal/BaseChart.cs @@ -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;