unity-event

Inspect and modify persistent listeners on UnityEvent fields at editor time.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-event-ethanjpope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-event
Source: https://github.com/ethanJPope/Our-Main-Hackathon-Game/tree/main/.agents/skills/unity-skills/skills/event
Command: npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-event-ethanjpope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wiring UnityEvent persistent listeners (like Button.onClick or Toggle.onValueChanged) through the Unity Inspector is manual and repetitive, and scripting these serialized listeners requires exact component types, method names, and call states that are easy to get wrong. ## Core Features & Use Cases - Listener Inspection: List all UnityEvent fields on a component, get persistent listener details, and count listeners on any event. - Listener Modification: Add, replace, remove, clear, batch-add, and copy persistent listeners with support for static arguments (int, float, string, bool, object references) and call states (Off, RuntimeOnly, EditorAndRuntime). - Runtime Invocation: Invoke a UnityEvent explicitly during Play mode for testing wired callbacks. - Use Case: You have a UI Button that must call methods on three different managers when clicked. Use event_add_listener_batch to wire all three persistent listeners in one call, serialized directly into the scene. ## Quick Start Ask the AI to add a persistent listener to the onClick event of the Button component on your Canvas GameObject that calls a specified public method on a target object.

Frequently Asked Questions about unity-event

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a persistent listener to a UnityEvent in the Unity Editor?

Use event_add_listener with the GameObject identifier, component name, event field name, target object, and public method name. The listener is serialized to the scene or prefab, matching what you would configure in the Inspector's event slots.

How to wire a Button onClick event to multiple methods in Unity?

Use event_add_listener_batch with a JSON array of target objects, components, and method names to attach several persistent listeners to onClick in one call. Each entry needs a targetObjectName, targetComponentName, and methodName.

Can I invoke a UnityEvent outside of Play mode in Unity?

event_invoke only works in Play mode or at runtime. In the editor it only triggers listeners set to EditorAndRuntime state, so listeners configured as RuntimeOnly will not fire during an editor-time invocation.

Why can't I remove UnityEvent listeners in semi-automatic mode?

event_remove_listener and event_clear_listeners are marked as Delete operations and are statically blocked in SemiAuto mode. They only run in Bypass mode or when explicitly added to the allowlist.

Does this support creating new UnityEvents or C# event subscriptions?

No. UnityEvents are declared in component source code, so this module only wires persistent listeners on existing events. For C# event code use the script module, and for XR interaction events use the xr module.