mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 21:40:41 +00:00
修复Chart在运行时被删除时会异常报错的问题 (#269)
This commit is contained in:
@@ -127,16 +127,21 @@ namespace XCharts.Runtime
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset() { }
|
||||
protected override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
}
|
||||
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
m_IsOnValidate = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
for (int i = transform.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
DestroyImmediate(transform.GetChild(i).gameObject);
|
||||
|
||||
Reference in New Issue
Block a user