private void RemoveListeners() { onStartEvent.RemoveListener(OnMyCallback); // Note: NOT OnStartEvent -= MyCallbackA; // OnStartEvent.RemoveListener(MyCallbackInt); // Note: issues removing anonymous function onMyIntEvent.RemoveListener(OnMyCallbackInt); onMyEvent.RemoveListener(OnMyCallbackInt); // remove all listeners // OnStartEvent.RemoveAllListeners(); // OnMyIntEvent.RemoveAllListeners(); // onMyEvent.RemoveAllListeners(); Logger.Print(">>> Remove Listeners"); }
public override void RemoveListener(UnityAction <int> action) { OnTrigger.RemoveListener(action); }