void OnDestroy() { m_ActiveDialogSelector?.Dispose(); TimeOfDaySelector?.Dispose(); TimeOfYearSelector?.Dispose(); UtcOffsetSelector?.Dispose(); LatitudeSelector?.Dispose(); LongitudeSelector?.Dispose(); NorthAngleSelector?.Dispose(); m_DialogButton.buttonClicked -= OnDialogButtonClicked; QueryArgHandler.Unregister(this); }
protected virtual void OnDestroy() { QueryArgHandler.Unregister(this); m_DisposeOnDestroy.ForEach(x => x.Dispose()); }