public void Raise(object caller, object data = null) { if (debug) { Debug.Log(string.Format("GameEvent Raised ({0}), caller: {1}, data: {2}", name, caller, data), this); } try { OnEventRaised?.Invoke(); OnEventDataRaised?.Invoke(new GameEventData(this, data, caller)); } catch (Exception e) { Debug.LogException(e); } }
public Delegate[] GetOnEventDataRaisedInvocationsList() { return(OnEventDataRaised?.GetInvocationList()); }