void OnDisable() { UnregDelayedWork(); if (_Lifetime != Lifetime.Frozen && !Application.isPlaying) { EditorBridge.OnDelayedCallOnce += OnDisableDelayed; _DelayedWork = DelayedWork.OnDisable; } }
private void UnregDelayedWork() { if (_DelayedWork == DelayedWork.OnEnable) { EditorBridge.OnDelayedCallOnce -= OnEnableDelayed; _DelayedWork = DelayedWork.None; } else if (_DelayedWork == DelayedWork.OnDisable) { EditorBridge.OnDelayedCallOnce -= OnDisableDelayed; _DelayedWork = DelayedWork.None; } }