fix destroying a gameobject inside a prefab

This commit is contained in:
Jacob Rapoport
2019-10-27 09:05:50 -07:00
committed by monitor1394
parent 54ee3d43f5
commit 16c8d26e2a
3 changed files with 5 additions and 5 deletions

View File

@@ -213,7 +213,7 @@ namespace XCharts
totalLegend++;
}
m_Legend.RemoveButton();
ChartHelper.DestoryAllChilds(legendObject.transform);
ChartHelper.DestroyAllChildren(legendObject.transform);
if (!m_Legend.show) return;
for (int i = 0; i < datas.Count; i++)
{
@@ -289,7 +289,7 @@ namespace XCharts
{
var labelObject = ChartHelper.AddObject(s_SerieLabelObjectName, transform, chartAnchorMin,
chartAnchorMax, chartPivot, new Vector2(chartWidth, chartHeight));
ChartHelper.DestoryAllChilds(labelObject.transform);
// ChartHelper.DestroyAllChildren(labelObject.transform);
int count = 0;
for (int i = 0; i < m_Series.Count; i++)
{