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
}