diff --git a/Assets/EventManager/Scripts/EventManager.cs b/Assets/EventManager/Scripts/EventManager.cs index d918d93..d325717 100644 --- a/Assets/EventManager/Scripts/EventManager.cs +++ b/Assets/EventManager/Scripts/EventManager.cs @@ -34,16 +34,17 @@ namespace FirstVillain.Event if (_delegateDict.TryGetValue(type, out EventDelegate tempDelegate)) { tempDelegate -= targetDelegate; - if (tempDelegate == null) + if (tempDelegate.GetInvocationList().Length == 0) { _delegateDict.Remove(type); - _delegateLookupDict.Remove(callback); } else { _delegateDict[type] = tempDelegate; } } + + _delegateLookupDict.Remove(callback); } }