unity-event
Installation
SKILL.md
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.
Triggers
- Hooking up UnityEvents in the Inspector
- Wiring button or trigger callbacks
- Scripting persistent listeners
- 在 Inspector 里挂接 UnityEvent、连接按钮或触发器回调、脚本化持久监听
Event Skills
Inspect and modify persistent listeners on UnityEvents (e.g. Button.onClick, Toggle.onValueChanged) — the same listeners you see in the Inspector's event drop slots.
Operating Mode
- 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 后服务端一步执行返结果。 - Auto / Bypass:未被禁列表拦截的 skill 直接执行。
- 本模块含 Delete 类 skill:
event_remove_listener、event_clear_listeners标记为SkillOperation.Delete,被IsForbiddenInSemi静态拦截 —— 仅 Bypass 模式或加入 Allowlist 才能调用。 event_invoke只在 Play mode / runtime 下有效;编辑器空跑时仅触发 EditorAndRuntime 监听。event_add_listener等写入的是 persistent listener(序列化到 prefab/scene),即可在编辑器时配置。