Exemple #1
0
    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");
    }
Exemple #2
0
 public override void RemoveListener(UnityAction <int> action)
 {
     OnTrigger.RemoveListener(action);
 }