Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

UnityEventTools.RemovePersistentListener

public static void RemovePersistentListener(Events.UnityEventBase unityEvent, int index);
public static void RemovePersistentListener(Events.UnityEventBase unityEvent, Events.UnityAction call);
public static void RemovePersistentListener(Events.UnityEventBase unityEvent, Events.UnityAction_1 call);
public static void RemovePersistentListener(Events.UnityEventBase unityEvent, Events.UnityAction_2 call);
public static void RemovePersistentListener(Events.UnityEventBase unityEvent, Events.UnityAction_3 call);
public static void RemovePersistentListener(Events.UnityEventBase unityEvent, Events.UnityAction_4 call);

Parameters

unityEvent Event to modify.
index Index to remove (if specified).
call Function to remove (if specified).

Description

Removes the given function from the event.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答