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