EventHelper Class
Definition
Section titled “Definition”Debug only helper methods for events.
public static class EventHelperInheritance object
Methods
Section titled “Methods”WarnIfLeftOverSubscribers(T, string, Object?)
Section titled “WarnIfLeftOverSubscribers(T, string, Object?)”Helper method that warns if the given delegate has any subscribers left.
This method is removed in non-debug builds, but you don’t need to explicitly remove it yourself.
[Conditional("DEBUG")]public static void WarnIfLeftOverSubscribers<T>(T action, string parameterName, Object? targetObject = null)Parameters
Section titled “Parameters”action T
The delegate to check.
parameterName string
The name of the delegate that will be used in the message.
targetObject UnityEngine.Object
Optional target object to ping when the log is selected.
Remarks
Section titled “Remarks”This method only does something in DEBUG builds.