unity-event

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

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-event-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-event
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/event
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-event-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually wiring UnityEvent listeners in the Unity Inspector is repetitive and error-prone, especially when configuring many buttons, toggles, or triggers across a scene. This Skill lets you inspect, add, replace, copy, and remove persistent listeners programmatically so event wiring can be automated and verified. ## 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 static arguments (int, float, string, bool, object references) and call modes (Off, RuntimeOnly, EditorAndRuntime). - Runtime Invocation: Invoke a UnityEvent explicitly during Play mode to test wired callbacks. - Use Case: When building a UI menu, wire every Button.onClick to its target handler in one batch operation instead of dragging references through the Inspector for each button. ## Quick Start Ask the agent to add a persistent listener to the onClick event of the Button component on the StartButton GameObject that calls the StartGame method on the GameManager 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 UnityEvent listener in the Unity Editor programmatically?

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

How do I wire multiple button onClick events at once in Unity?

Use event_add_listener_batch with a JSON array of target object, component, and method entries. It adds all listeners to the specified UnityEvent in one call and returns how many were added.

Can I invoke a UnityEvent outside Play mode in the Unity Editor?

event_invoke only takes effect in Play mode or at runtime. In the editor it only triggers listeners whose call state is EditorAndRuntime, so editor-time testing requires that mode on the listener.

Why is removing a UnityEvent listener blocked in semi-auto mode?

event_remove_listener and event_clear_listeners are marked as Delete operations and are statically forbidden in SemiAuto mode. They can only run in Bypass mode or when the skill is added to the allowlist.

What is the difference between persistent listeners and C# event subscriptions in Unity?

Persistent listeners are serialized in the scene or prefab and visible in the Inspector, which is what this module manages. C# event subscriptions written in code are runtime-only and should be handled through the script module instead.