public void OnDestroy() { if (m_CurveEditor != null) { m_CurveEditor.OnDestroy(); } DestroyImmediate(m_State); }