unity-event
Installation
SKILL.md
Unity Event Skills
Inspect and modify persistent listeners on UnityEvents (for example Button.onClick or Toggle.onValueChanged), the same listeners shown in the Inspector's event slots. Parameters come from the schema (GET /skills/schema?category=Event&wire=v2); execution and dryRun rules: root SKILL.md.
When to use
- Hooking up UnityEvents in the Inspector
- Wiring button or trigger callbacks
- Scripting persistent listeners
Rules
- Listeners added here are serialized with the prefab or scene, so they are configured at editor time.
event_invokeis valid only in Play mode or at runtime; outside it, onlyEditorAndRuntimelisteners fire. - The target locator is decided by the first one given, in this order:
targetEntityId,targetInstanceId,targetPath,targetObjectName. A locator that finds nothing is an error and never falls back to the next one. A name shared by several objects takes the first and says so inresolutionNotes; a partial name matching several is refused with the candidates. event_get_listenersreturnstargetEntityIdfor each listener. Pass it back toevent_add_listenerorevent_set_listenerto bind the exact same object (a specific component, an asset or a scene GameObject).targetalone is only a name and can be shared.- An
objectargument passes a Unity object to a method. Among overloads of that method name, the one whose parameter type is closest to the argument's type is used, and the stored listener resolves the same way when it runs. event_add_listenerneeds the exact component type and public method name on the target.event_remove_listenerandevent_clear_listenersare delete-class: under Approval or Auto they returnMODE_FORBIDDEN(the user must use Bypass or an Allowlist entry).