addressables-design
Source-anchored design rules for Unity Addressables 1.22.3/2.9.1
Wire UnityEvent persistent listeners at editor time
$ npx -y skills add Besty0728/Unity-Skills --skill event --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/eventContext preview
The summary Claude sees to decide when to auto-load this skill.
Wire UnityEvent persistent listeners at editor time
name: unity-event description: Wire UnityEvent persistent listeners at editor time
> **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.
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.
**DO NOT** (common hallucinations):
**Routing**:
Get persistent listeners of a UnityEvent.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | name | string | No | null | GameObject name | | instanceId | int | No | 0 | GameObject instance ID | | path | string | No | null | GameObject hierarchy path | | componentName | string | Yes | - | Component name | | eventName | string | Yes | - | Event field name (e.g. "onClick") |
**Returns:** `{ success, gameObject, component, eventName, listenerCount, listeners }`
Add a persistent listener to a UnityEvent (Editor time).
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | name | string | No | null | GameObject name | | instanceId | int | No | 0 | GameObject instance ID | | path | string | No | null | GameObject hierarchy path | | componentName | string | Yes | - | Component owning the event | | eventName | string | Yes | - | Event field name (e.g. "onClick") | | targetObjectName | string | Yes | - | GameObject holding the method to call | | targetComponentName | string | No | null | Component on the target, or `GameObject` to call the object itself | | methodName | string | Yes | - | Public method or `set_PropertyName` | | mode | string | No | RuntimeOnly | Off, RuntimeOnly, or EditorAndRuntime | | argType | string | No | void | void, int, float, string, or bool | | floatArg | float | No | 0 | Static float argument | | intArg | int | No | 0 | Static int argument | | stringArg | string | No | null | Static string argument | | boolArg | bool | No | false | Static bool argument |
**Returns:** `{ success, message, index, mode }`
Unlike `event_set_listener`, this skill has no `object` `argType` — it only reaches the standard `UnityEvent` overloads.
Remove a persistent listener by index.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | name | string | No | null | GameObject name | | instanceId | int | No | 0 | GameObject instance ID | | path | string | No | null | GameObject hierarchy path | | componentName | string | Yes | - | Component name | | eventName | string | Yes | - | Event field name | | index | int | No | 0 | Listener index |
**Returns:** `{ success, remainingCount }`
Invoke a UnityEvent explicitly (Runtime only).
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | name | string | No | null | GameObject name | | instanceId | int | No | 0 | GameObject instance ID | | path | string | No | null | GameObject hierarchy path | | componentName | string | Yes | - | Component name | | eventName | string | Yes | - | Event field name |
**Returns:** `{ success, message }`
Remove all persistent listeners from a UnityEvent.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | name | string | No | null | GameObject name | | instanceId | int | No | 0 | GameObject instance ID | | path | string | No | null | GameObject hierarchy path | | componentName | string | Yes | - | Component name | | eventName | string | Yes | - | Event field name (e.g. "onClick") |
**Returns:** `{ success, removed }`
Set a listener's call state (Off, RuntimeOnly, EditorAndRuntime).
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | name | string | No | null | GameObject name | | instanceId | int | No | 0 | GameObject instance ID | | path | string | No | null | GameObject hierarchy path | | componentName | string | Yes | - | Component name | | eventName | string | Yes | - | Event field name | | index | int | No | 0 | Listener index | | state | string | No | null | Call state: "Off", "RuntimeOnly", or "E
REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.
Source-anchored design rules for Unity Addressables 1.22.3/2.9.1
Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based)