mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 12:08:46 +00:00
修复背景组件初始化时报错的问题
This commit is contained in:
@@ -258,6 +258,7 @@ namespace XCharts
|
|||||||
|
|
||||||
private void InitBackground()
|
private void InitBackground()
|
||||||
{
|
{
|
||||||
|
if (!transform.parent) return;
|
||||||
int childCount = transform.parent.childCount;
|
int childCount = transform.parent.childCount;
|
||||||
if (childCount > 2) m_Background.runtimeActive = false;
|
if (childCount > 2) m_Background.runtimeActive = false;
|
||||||
else if (childCount == 1) m_Background.runtimeActive = true;
|
else if (childCount == 1) m_Background.runtimeActive = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user