mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 06:20:15 +00:00
修复Chart在运行时被删除时会异常报错的问题 (#269)
This commit is contained in:
@@ -323,6 +323,8 @@ namespace XCharts.Runtime
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
XChartsMgr.RemoveChart(chartName);
|
||||
for (int i = transform.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
DestroyImmediate(transform.GetChild(i).gameObject);
|
||||
|
||||
Reference in New Issue
Block a user