void ChangeDirector(IDirector director) { if (m_Director != null) { m_Director.Dispose(); m_Director = null; } if (m_SequenceEditor != null) { m_SequenceEditor.Dispose(); m_SequenceEditor = null; } m_Director = director; Repaint(); }
private void OnDestroy() { ChangeDirector(null); m_SequenceEditor?.Dispose(); }