unity-event

Configure persistent UnityEvent listeners on components at editor time.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-event-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-event
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/event
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-event-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wiring UnityEvent callbacks in the Unity Inspector is repetitive and error-prone, especially when connecting many button clicks, toggles, or trigger callbacks across a scene. This Skill lets you inspect, add, remove, replace, and copy serialized persistent listeners on UnityEvents programmatically at editor time. ## Core Features & Use Cases - Listener Inspection: List all UnityEvent fields on a component and read their persistent listeners, counts, and call states. - Listener Wiring: Add, replace, batch-add, or copy persistent listeners between events, with support for call modes (Off, RuntimeOnly, EditorAndRuntime) and static arguments (int, float, string, bool, object references). - Runtime Invocation: Invoke a UnityEvent explicitly during Play mode for testing event chains. - Use Case: You have a UI Button whose onClick should call a GameManager's StartGame method. Ask the AI to add that persistent listener, then verify it with a listener count check — no manual Inspector clicking required. ## Quick Start Add a persistent listener to the onClick event of the Button component on my Canvas object that calls the StartGame method on the GameManager.

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 UnityEvent listener in the Unity Editor programmatically?

Use event_add_listener with the target GameObject, component name, event field name, and the target object, component, and method to call. The listener is serialized as a persistent listener into the scene or prefab, just like wiring it in the Inspector.

How do I wire a Button onClick event without using the Inspector?

Call event_add_listener targeting the Button component's onClick event, specifying the target GameObject, component, and method name. You can also set the call mode to RuntimeOnly or EditorAndRuntime and pass static arguments if the method needs them.

Can I invoke a UnityEvent outside of Play mode?

event_invoke only works in Play mode or at runtime. In the editor without Play mode, it only triggers listeners set to EditorAndRuntime; RuntimeOnly listeners will not fire.

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

event_remove_listener and event_clear_listeners are marked as Delete operations and are blocked in SemiAuto mode. They require Bypass mode or explicit allowlisting before they can be executed.

Does this create new UnityEvents or subscribe C# events?

No. UnityEvents are declared in component source code; 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.