unity-event

Inspect and modify persistent UnityEvent listeners in the Unity Editor.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/lrbjk/FenShen_Remake_V0 --skill unity-event-lrbjk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-event
Source: https://github.com/lrbjk/FenShen_Remake_V0/tree/main/.codex/skills/unity-skills/skills/event
Command: npx skills add https://github.com/lrbjk/FenShen_Remake_V0 --skill unity-event-lrbjk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

UnityEvent fields (like Button.onClick) are difficult to audit and modify across scenes and prefabs using only the Inspector or ad-hoc scripts. This Skill centralizes inspection, persistent listener management, and safe modifications so teams can reliably update UI callbacks without runtime surprises.

Core Features & Use Cases

  • Inspect persistent listeners: List and count persistent listeners on a UnityEvent to understand what callbacks will run.
  • Editor-time listener management: Add, remove, clear, batch-add, copy listeners, and set listener call states for component UnityEvents.
  • Runtime considerations: Supports explicit event invocation only at runtime and enforces exact component and method name matching for persistent listener additions.
  • Use Case: Audit all Button.onClick listeners in a UI panel, remove deprecated callbacks, and add a new analytics callback to multiple buttons in one operation.

Quick Start

Use the unity-event skill to add a persistent onClick listener to the Button named SubmitButton that calls SubmitForm on the FormHandler component.

Frequently Asked Questions about unity-event

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

FAQPage Schema
How do I inspect Unity UI button onClick listeners in the editor?

To inspect Unity UI button onClick listeners, you can list and count persistent listeners on a UnityEvent. This reveals exactly which component methods are registered as callbacks before runtime execution.

Can I batch add persistent listeners to multiple Unity buttons at once?

Yes, you can batch add persistent listeners to multiple Unity buttons. This requires providing exact component and method names for the callbacks, allowing you to apply a new listener across a UI panel in one operation.

What is the best way to copy onClick listeners between UnityEvents?

The best way to copy onClick listeners between UnityEvents is using editor-time listener management tools. This allows you to transfer persistent callbacks between events reliably without writing ad-hoc scripts to duplicate the references.

Does UnityEvent listener management work outside of play mode?

UnityEvent listener management works in the Unity Editor outside of play mode for adding, removing, and toggling persistent listeners. However, explicit event invocation is restricted to runtime contexts only.

Why do my added UnityEvent persistent listeners fail to call the target method?

Added UnityEvent persistent listeners fail if the exact component and method names do not match. Persistent listener additions require precise string matching to the target component and its public method signature.