Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

Events.UnityEventTools.AddPersistentListener

public static function AddPersistentListener(unityEvent: UnityEventBase): void;
public static function AddPersistentListener(unityEvent: UnityEvent, call: UnityAction): void;
public static function AddPersistentListener(unityEvent: UnityEvent<T0>, call: UnityAction<T0>): void;
public static function AddPersistentListener(unityEvent: UnityEvent<T0,T1>, call: UnityAction<T0,T1>): void;
public static function AddPersistentListener(unityEvent: UnityEvent<T0,T1,T2>, call: UnityAction<T0,T1,T2>): void;
public static function AddPersistentListener(unityEvent: UnityEvent<T0,T1,T2,T3>, call: UnityAction<T0,T1,T2,T3>): void;

Parameters

unityEvent Event to modify.
call Function to call.

Description

Adds a persistent, call to the listener. Will be invoked with the arguments as defined by the Event and sent from the call location.