Supported Event Types
Live Event Debugging in InspectMe Pro supports a broad range of delegates and Unity event signatures. Whether you're using standard .NET delegates like Action
, Func<T>
, or Unity’s UnityEvent<T>
, InspectMe allows direct invocation from the Inspector, including support for parameters and return values.
This feature shares foundational logic with the Method Studio, and thus supports the same parameter and return type capabilities. If you're familiar with triggering methods in InspectMe, you'll feel right at home triggering events.
Supported Signatures Table
Type | Example Signature | Return Type | Parameters | Supported? | Notes |
---|---|---|---|---|---|
Action |
Action myEvent |
void |
❌ | ✅ | Basic no-argument delegate |
Action<T1> |
Action<string> |
void |
✅ | ✅ | Full parameter input supported |
Action<T1, T2> |
Action<string, bool> |
void |
✅ | ✅ | Supports up to 16 parameters |
Func<TResult> |
Func<int> |
int |
❌ | ✅ | Return value is displayed |
Func<T1, TResult> |
Func<string, bool> |
bool |
✅ | ✅ | Input parameters + return value |
Func<T1, T2, TResult> |
Func<string, int, float> |
float |
✅ | ✅ | All parameters supported |
Predicate<T> |
Predicate<string> |
bool |
✅ | ✅ | Treated as Func<T, bool> |
Comparison<T> |
Comparison<int> |
int |
✅ | ✅ | Treated as Func<T, T, int> |
Custom delegate | delegate bool MyValidator(string name) |
bool or void |
✅ | ✅ | Treated as MulticastDelegate |
UnityEvent |
UnityEvent onDeath |
void |
❌ | ✅ | Reflection-based invocation |
UnityEvent<T> |
UnityEvent<int> |
void |
✅ | ✅ | Full parameter editing supported |
UnityEvent<T1, T2> |
UnityEvent<int, string> |
void |
✅ | ✅ | Parameters handled via reflection |
Parameter and Return Type Support
All parameter and return type handling in Live Event Debugging follows the same specification as used in the Supported Method Types guide. This ensures consistency across method and event invocation, especially when working with:
- Primitive types and structs (
int
,bool
,Vector3
, etc.) - Unity-specific types (
GameObject
,AnimationCurve
, etc.) - Generic collections (
List<T>
,Dictionary<TKey, TValue>
) - Complex return values (e.g.
Rect
,Color
, or custom types)
Notes
- Parameters can be provided before triggering events.
- Return values from supported delegates (like
Func<>
) are displayed in the inspector. - When invoking a delegate with multiple listeners, only the return value from the last subscriber is returned by design. For technical detail, see the Return Values page.
- Delegates with
ref
,out
, or async modifiers are currently not supported. - UnityEvent parameters are invoked through reflection and behave according to Unity's internal implementation.