unity-event
Agent skill fromBesty0728/Unity-Skills
Wire UnityEvent persistent listeners at editor time
How to install unity-event
install unity-event
# install the Unity-Skills pack with the skills CLI
npx skills add Besty0728/Unity-Skills# or add only this skill to Claude Code: copy the folder
SkillsForUnity/unity-skills~/skills/event/
# into
~/.claude/skills/event/ (all projects)
.claude/skills/event/ (one project)
1> **Before calling any skill in this module:** if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via `GET /skills/recommend?includeSchema=true`) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.23## Triggers4- Hooking up UnityEvents in the Inspector5- Wiring button or trigger callbacks6- Scripting persistent listeners7- 在 Inspector 里挂接 UnityEvent、连接按钮或触发器回调、脚本化持久监听89# Event Skills1011Inspect and modify persistent listeners on UnityEvents (e.g. `Button.onClick`, `Toggle.onValueChanged`) — the same listeners you see in the Inspector's event drop slots.1213## Operating Mode1415- **Approval**:查询类 skill(`event_get_listeners` / `event_list_events` / `event_get_listener_count`,源码标 `SkillMode.SemiAuto`)直接执行;其余变更/调用类(`event_add_listener` / `event_set_listener` / `event_set_listener_state` / `event_invoke` / `event_add_listener_batch` / `event_copy_listeners`,标 `SkillMode.FullAuto`)需用户 grant,grant 后服务端一步执行返结果。16- **Auto / Bypass**:未被禁列表拦截的 skill 直接执行。17- 本模块**含 Delete 类 skill**:`event_remove_listener`、`event_clear_listeners` 标记为 `SkillOperation.Delete`,被 `IsForbiddenInSemi` 静态拦截 —— 仅 **Bypass** 模式或加入 **Allowlist** 才能调用。18- `event_invoke` 只在 Play mode / runtime 下有效;编辑器空跑时仅触发 EditorAndRuntime 监听。`event_add_listener` 等写入的是 persistent listener(序列化到 prefab/scene),即可在编辑器时配置。1920**DO NOT** (common hallucinations):21…
Excerpt shown under the repository's MIT license.
