unity-event

Inspect, add, remove, and invoke UnityEvent listeners on a GameObject.

1|Updated Feb 22, 2024
One-click install
npx skills add https://github.com/Stardust-liu/EDC_Framework --skill unity-event
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-event
Source: https://github.com/Stardust-liu/EDC_Framework/tree/main/Assets/AI/Unity-Skills-1.5.5/unity-skills/skills/event
Command: npx skills add https://github.com/Stardust-liu/EDC_Framework --skill unity-event

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inspect UnityEvent listeners on a GameObject. This Skill makes it easy to view and manage UI event wiring without diving into code.

Core Features & Use Cases

  • Get listeners: retrieve all persistent listeners assigned to a UnityEvent on a GameObject.
  • Add listeners: attach a target method to an event at edit-time or runtime.
  • Remove listeners: delete a listener by index.
  • Invoke events: trigger a UnityEvent programmatically for testing or runtime behavior.

Quick Start

Interact with a GameObject's UnityEvent in Unity Editor to view, add, or remove listeners.

Frequently Asked Questions about unity-event

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

FAQPage Schema
How do I inspect UnityEvent listeners on a GameObject at runtime?

To inspect UnityEvent listeners on a GameObject, you can use this Skill to retrieve all persistent listeners assigned to events like Button onClick without diving into code. It supports runtime inspection directly within the Unity Editor.

Can I add a listener to a Unity Button onClick event programmatically?

Yes, you can add a listener to a Unity Button onClick event by specifying the target object, method name, and mode. This Skill allows you to attach target methods to UI events at edit-time or runtime.

What is the best way to remove a persistent listener from a UnityEvent?

The best way to remove a persistent listener from a UnityEvent is by using this Skill to delete the specific listener by its index. This allows precise management of UI event wiring without modifying the underlying scripts.

How can I trigger a UnityEvent for testing UI behavior in the Unity Editor?

You can trigger a UnityEvent for testing UI behavior by invoking the event programmatically through this Skill. It enables you to fire events like Button onClick on demand to verify runtime behaviors.

Does managing UnityEvents with this approach require writing custom scripting?

No, managing UnityEvents does not require writing custom scripting. This Skill enables you to view, add, or remove UI event listeners directly on a GameObject, bypassing the need to manually edit code.

Why am I unable to see all active UI event listeners on my GameObject?

If you are unable to see all active UI event listeners on your GameObject, this Skill can retrieve and list all persistent listeners currently assigned to a UnityEvent, giving you full visibility into your event wiring.