You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Unsafe version of the <see cref="EventChannelExtensions.Invoke"/> function. This is directly on the class, but it does not have check if the channel is null or not.
41
+
/// </summary>
42
+
/// <param name="argument"></param>
43
+
publicvirtualvoidInvokeUnsafe(Targument)
44
+
{
45
+
listeners?.Invoke(argument);
46
+
}
47
+
48
+
49
+
#if UNITY_EDITOR
50
+
publicvirtualvoidOnPlayModeExit()
51
+
{
52
+
if(listeners==null)return;
53
+
54
+
if(_checkForLeaksOnPlayModeExit){
55
+
intcount=listeners.GetInvocationList().Length;
56
+
if(count>0)Debug.LogWarning($"<color=red>Event Leak Detected!</color> '{name}' had {count} listeners after exiting play mode!",this);
/// The base class for event channel based listeners. Recommended for UI or if the GO only has one event listener, otherwise consider using the <see cref="BaseEventChannel{T}"/> directly
9
+
/// </summary>
10
+
/// <remarks>When inheriting this class, it is recommended to leave the body empty</remarks>
/// Unsafe version of the <see cref="EventChannelExtensions.Invoke"/> function. This is directly on the class, but it does not have check if the channel is null or not.
41
-
/// </summary>
42
-
/// <param name="argument"></param>
43
-
publicvirtualvoidInvokeUnsafe(Targument)
24
+
publicoverridevoidInvokeUnsafe(Emptyargument)
44
25
{
45
-
listeners?.Invoke(argument);
26
+
listeners?.Invoke();
27
+
base.InvokeUnsafe(argument);
46
28
}
47
29
48
30
49
-
#if UNITY_EDITOR
50
-
publicvirtualvoidOnPlayModeExit()
51
-
{
52
-
if(listeners==null)return;
53
-
54
-
if(_checkForLeaksOnPlayModeExit){
55
-
intcount=listeners.GetInvocationList().Length;
56
-
if(count>0)Debug.LogWarning($"<color=red>Event Leak Detected!</color> '{name}' had {count} listeners after exiting play mode!",this);
/// The base class for event channel based listeners. Recommended for UI or if the GO only has one event listener, otherwise consider using the <see cref="EventChannel{T}"/> directly
9
-
/// </summary>
10
-
/// <remarks>When inheriting this class, it is recommended to leave the body empty</remarks>
0 commit comments