public static void SafeInvoke <T>(this UnityEvent <T> unityEvent, T param) { if (!unityEvent.IsAssigned()) { return; } unityEvent?.Invoke(param); }
public static void SafeInvoke(this UnityEvent unityEvent) { if (!unityEvent.IsAssigned()) { return; } unityEvent?.Invoke(); }
private void OnDied() { if (_onDied.IsAssigned()) { _onDied.Invoke(); } Died?.Invoke(this); }