mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 23:40:10 +00:00
修复背景组件初始化时报错的问题
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user