UnityEngine.Events.UnityEvent.RemoveListener C# (CSharp) Method

RemoveListener() public method

Remove a non persistent listener from the UnityEvent.

public RemoveListener ( UnityAction call ) : void
call UnityAction Callback function.
return void
        public void RemoveListener(UnityAction call)
        {
            base.RemoveListener(call.Target, NetFxCoreExtensions.GetMethodInfo(call));
        }
    }

Usage Example

コード例 #1
0
    public static void RemoveEditorListener(this UnityEngine.Events.UnityEvent unityEvent, UnityAction call)
    {
#if UNITY_EDITOR
        if (Application.isPlaying)
        {
            UnityEditor.Events.UnityEventTools.RemovePersistentListener(unityEvent, call);
        }
        else
        {
            unityEvent.RemoveListener(call);
        }
#else
        unityEvent.RemoveListener(call);
#endif
    }
All Usage Examples Of UnityEngine.Events.UnityEvent::RemoveListener