claude-code-arcane 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +104 -55
- package/agents/career/career-strategist.md +88 -0
- package/agents/career/cv-reviewer.md +81 -0
- package/agents/career/hiring-manager.md +68 -0
- package/agents/career/mock-interviewer.md +76 -0
- package/agents/freelance/client-screener.md +84 -0
- package/agents/freelance/discovery-call.md +65 -0
- package/agents/freelance/pipeline-strategist.md +99 -0
- package/agents/freelance/proposal-reviewer.md +82 -0
- package/agents/game/ue-blueprint-specialist.md +125 -0
- package/agents/game/ue-gas-specialist.md +133 -0
- package/agents/game/ue-umg-specialist.md +131 -0
- package/dist/cli.js +57 -13
- package/docs/RELEASE-SETUP.md +1 -1
- package/docs/SKILLS-CATALOG.md +67 -4
- package/docs/USER-GUIDE.md +77 -72
- package/docs/agent-hierarchy.md +21 -1
- package/docs/presentations/build_arcane_deck.py +2 -2
- package/docs/presentations/build_arcane_deck_12.py +2 -2
- package/hooks/detect-unreal.sh +90 -0
- package/package.json +2 -2
- package/profiles/freelance.yaml +43 -0
- package/profiles/job-hunt.yaml +5 -2
- package/profiles/unreal-dev.yaml +97 -0
- package/rules/drafter-reviewer.md +16 -3
- package/rules/freelance-guardrails.md +53 -0
- package/rules/gamedev/unreal-code.md +125 -0
- package/skills/career-registry/SKILL.md +95 -0
- package/skills/career-registry/scripts/career_registry.py +488 -0
- package/skills/client-screen/SKILL.md +83 -0
- package/skills/client-screen/references/red-flags.md +95 -0
- package/skills/cover-letter/SKILL.md +4 -3
- package/skills/cv-tailor/SKILL.md +11 -2
- package/skills/freelance-deliver/SKILL.md +90 -0
- package/skills/freelance-hunt/SKILL.md +126 -0
- package/skills/freelance-hunt/references/templates/Connects.md +39 -0
- package/skills/freelance-hunt/references/templates/Contrato.md +60 -0
- package/skills/freelance-hunt/references/templates/Propuesta.md +66 -0
- package/skills/freelance-kickoff/SKILL.md +94 -0
- package/skills/freelance-pipeline/SKILL.md +109 -0
- package/skills/freelance-pipeline/scripts/import_history.py +425 -0
- package/skills/freelance-profile/SKILL.md +93 -0
- package/skills/freelance-proposal/SKILL.md +112 -0
- package/skills/freelance-scan/SKILL.md +196 -0
- package/skills/freelance-scan/references/dedup.md +35 -0
- package/skills/freelance-scan/references/platforms.md +167 -0
- package/skills/freelance-scan/scripts/freelance_search.py +1077 -0
- package/skills/install-mcp/SKILL.md +135 -46
- package/skills/install-mcp/references/unreal-operations.md +55 -0
- package/skills/interview-prep/SKILL.md +11 -3
- package/skills/job-aplicar/SKILL.md +5 -1
- package/skills/job-hunt/SKILL.md +17 -0
- package/skills/job-outcome/SKILL.md +15 -1
- package/skills/job-upskill/SKILL.md +10 -2
- package/skills/ue-actor-component-architecture/SKILL.md +509 -0
- package/skills/ue-actor-component-architecture/references/actor-lifecycle.md +301 -0
- package/skills/ue-actor-component-architecture/references/component-types.md +592 -0
- package/skills/ue-ai-navigation/SKILL.md +526 -0
- package/skills/ue-ai-navigation/references/behavior-tree-patterns.md +392 -0
- package/skills/ue-ai-navigation/references/behavior-tree-workflow.md +107 -0
- package/skills/ue-ai-navigation/references/custom-bttask.md +104 -0
- package/skills/ue-ai-navigation/references/eqs-reference.md +423 -0
- package/skills/ue-animation-system/SKILL.md +521 -0
- package/skills/ue-animation-system/references/anim-notify-reference.md +486 -0
- package/skills/ue-animation-system/references/locomotion-setup.md +550 -0
- package/skills/ue-async-threading/SKILL.md +433 -0
- package/skills/ue-async-threading/references/thread-safety-guide.md +213 -0
- package/skills/ue-async-threading/references/threading-patterns.md +345 -0
- package/skills/ue-audio-system/SKILL.md +527 -0
- package/skills/ue-audio-system/references/audio-setup-patterns.md +700 -0
- package/skills/ue-blueprints/SKILL.md +134 -0
- package/skills/ue-blueprints/references/communication.md +82 -0
- package/skills/ue-character-movement/SKILL.md +475 -0
- package/skills/ue-character-movement/references/cmc-extension-patterns.md +335 -0
- package/skills/ue-character-movement/references/movement-pipeline.md +189 -0
- package/skills/ue-cpp-foundations/SKILL.md +533 -0
- package/skills/ue-cpp-foundations/references/components-and-gc.md +107 -0
- package/skills/ue-cpp-foundations/references/container-patterns.md +544 -0
- package/skills/ue-cpp-foundations/references/delegate-patterns.md +497 -0
- package/skills/ue-cpp-foundations/references/gameplay-classes-cpp.md +136 -0
- package/skills/ue-cpp-foundations/references/property-specifiers.md +306 -0
- package/skills/ue-data-assets-tables/SKILL.md +527 -0
- package/skills/ue-data-assets-tables/references/asset-loading-patterns.md +306 -0
- package/skills/ue-data-assets-tables/references/data-driven-design.md +378 -0
- package/skills/ue-editor-tools/SKILL.md +523 -0
- package/skills/ue-editor-tools/references/detail-customization-patterns.md +395 -0
- package/skills/ue-editor-tools/references/editor-module-setup.md +480 -0
- package/skills/ue-game-features/SKILL.md +477 -0
- package/skills/ue-game-features/references/experience-system.md +222 -0
- package/skills/ue-game-features/references/game-feature-patterns.md +308 -0
- package/skills/ue-gameplay-abilities/SKILL.md +518 -0
- package/skills/ue-gameplay-abilities/references/ability-task-reference.md +391 -0
- package/skills/ue-gameplay-abilities/references/gameplay-effect-reference.md +397 -0
- package/skills/ue-gameplay-abilities/references/gas-setup-patterns.md +369 -0
- package/skills/ue-gameplay-framework/SKILL.md +466 -0
- package/skills/ue-gameplay-framework/references/framework-class-map.md +243 -0
- package/skills/ue-input-system/SKILL.md +394 -0
- package/skills/ue-input-system/references/cpp-setup.md +131 -0
- package/skills/ue-input-system/references/enhanced-input-workflow.md +117 -0
- package/skills/ue-input-system/references/input-action-reference.md +731 -0
- package/skills/ue-mass-entity/SKILL.md +476 -0
- package/skills/ue-mass-entity/references/mass-entity-patterns.md +319 -0
- package/skills/ue-mass-entity/references/mass-fragment-reference.md +119 -0
- package/skills/ue-materials-rendering/SKILL.md +526 -0
- package/skills/ue-materials-rendering/references/material-parameter-reference.md +216 -0
- package/skills/ue-materials-rendering/references/post-process-settings.md +383 -0
- package/skills/ue-module-build-system/SKILL.md +487 -0
- package/skills/ue-module-build-system/references/build-cs-reference.md +418 -0
- package/skills/ue-module-build-system/references/common-build-errors.md +381 -0
- package/skills/ue-naming-conventions/SKILL.md +142 -0
- package/skills/ue-naming-conventions/references/asset-name-modifiers.md +233 -0
- package/skills/ue-naming-conventions/references/content-structure.md +83 -0
- package/skills/ue-networking-replication/SKILL.md +452 -0
- package/skills/ue-networking-replication/references/replication-patterns.md +526 -0
- package/skills/ue-networking-replication/references/rpc-decision-guide.md +393 -0
- package/skills/ue-niagara-effects/SKILL.md +531 -0
- package/skills/ue-niagara-effects/references/niagara-data-interfaces.md +491 -0
- package/skills/ue-niagara-effects/references/niagara-parameter-types.md +153 -0
- package/skills/ue-niagara-effects/references/niagara-workflow.md +115 -0
- package/skills/ue-packaging/SKILL.md +116 -0
- package/skills/ue-physics-collision/SKILL.md +423 -0
- package/skills/ue-physics-collision/references/collision-channel-setup.md +218 -0
- package/skills/ue-physics-collision/references/trace-patterns.md +499 -0
- package/skills/ue-procedural-generation/SKILL.md +505 -0
- package/skills/ue-procedural-generation/references/pcg-node-reference.md +381 -0
- package/skills/ue-procedural-generation/references/procedural-mesh-patterns.md +940 -0
- package/skills/ue-project-context/SKILL.md +305 -0
- package/skills/ue-sequencer-cinematics/SKILL.md +506 -0
- package/skills/ue-sequencer-cinematics/references/sequencer-patterns.md +629 -0
- package/skills/ue-serialization-savegames/SKILL.md +524 -0
- package/skills/ue-serialization-savegames/references/save-system-architecture.md +705 -0
- package/skills/ue-state-trees/SKILL.md +489 -0
- package/skills/ue-state-trees/references/state-tree-mass-integration.md +184 -0
- package/skills/ue-state-trees/references/state-tree-patterns.md +321 -0
- package/skills/ue-testing-debugging/SKILL.md +520 -0
- package/skills/ue-testing-debugging/references/automation-test-patterns.md +387 -0
- package/skills/ue-testing-debugging/references/profiling-commands.md +357 -0
- package/skills/ue-ui-umg-slate/SKILL.md +431 -0
- package/skills/ue-ui-umg-slate/references/common-ui-setup.md +484 -0
- package/skills/ue-ui-umg-slate/references/widget-types.md +487 -0
- package/skills/ue-world-level-streaming/SKILL.md +518 -0
- package/skills/ue-world-level-streaming/references/streaming-patterns.md +414 -0
- package/templates/gamedev/unreal-project-context.md +107 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ue-blueprints
|
|
3
|
+
description: "Blueprint visual scripting — Blueprint Classes, Event Graph, Construction Script, Cast vs Interface vs Event Dispatcher"
|
|
4
|
+
category: "gamedev"
|
|
5
|
+
argument-hint: "[blueprint o graph]"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
allowed-tools: Read, Glob, Grep, Bash, Write, Edit
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# UE Blueprints (Visual Scripting)
|
|
11
|
+
|
|
12
|
+
Structure gameplay logic in Unreal Engine 5 Blueprints: pick the right graph, expose data cleanly, and choose a communication method that doesn't create hard-reference spaghetti. Blueprints are node graphs, so the snippets below describe node flows rather than compilable code.
|
|
13
|
+
|
|
14
|
+
Ask before writing: this skill edits Blueprint assets and the C++ classes they derive from. Propose the change and get approval before using Write or Edit.
|
|
15
|
+
|
|
16
|
+
## Context Check
|
|
17
|
+
|
|
18
|
+
Read `docs/unreal/project-context.md` before proceeding. Confirm:
|
|
19
|
+
|
|
20
|
+
- Engine version — node names and defaults drift between releases
|
|
21
|
+
- Whether the project is Blueprint-only or has a C++ base (changes where logic belongs)
|
|
22
|
+
- Team conventions for the C++/Blueprint boundary and asset naming (`BP_`, `WBP_`, `BPI_`)
|
|
23
|
+
|
|
24
|
+
## When to Use
|
|
25
|
+
|
|
26
|
+
- Authoring a Blueprint Class, wiring the Event Graph (BeginPlay/Tick/overlap), using the Construction Script, creating variables/functions/macros, or choosing how two Blueprints communicate.
|
|
27
|
+
- The project works visually rather than in C++.
|
|
28
|
+
|
|
29
|
+
**When not to use:** performance-critical systems, large data structures, or anything that benefits from source-control diffs and unit tests → `/ue-cpp-foundations`. Player input mapping → `/ue-input-system`. AI decision logic → `/ue-ai-navigation`.
|
|
30
|
+
|
|
31
|
+
## Core Workflow
|
|
32
|
+
|
|
33
|
+
1. **Choose the Blueprint type.** A **Blueprint Class** (derived from Actor/Pawn/Character/ActorComponent) defines a reusable object. The **Level Blueprint** is a per-level graph for level-specific scripting only — don't put reusable logic there.
|
|
34
|
+
2. **Use the Construction Script for editor-time setup** (procedural placement, configuring components from variables) — it runs when the actor is placed or edited, *not* during play.
|
|
35
|
+
3. **Use the Event Graph for runtime logic.** `Event BeginPlay` for init, input/overlap events for reactions. Avoid `Event Tick` unless you truly need per-frame work.
|
|
36
|
+
4. **Expose data with variables.** Click the eye icon to make a variable Instance Editable, and group related ones with categories. Mark **pure** functions (no exec pin) for getters.
|
|
37
|
+
5. **Pick a communication method by coupling.** Direct **Cast** for things you own, **Blueprint Interface** to call across types without hard references, **Event Dispatcher** to broadcast one-to-many.
|
|
38
|
+
6. **Verify** with the Blueprint debugger: drop breakpoints on nodes, watch variable values, and use Print String to confirm execution paths during Play In Editor (PIE).
|
|
39
|
+
|
|
40
|
+
## Patterns
|
|
41
|
+
|
|
42
|
+
### 1. Reactive Event Graph (no Tick)
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
Event BeginPlay
|
|
46
|
+
-> Set 'StartLocation' = GetActorLocation
|
|
47
|
+
-> Bind Event to OnComponentBeginOverlap (TriggerVolume) [calls custom event OnEnterZone]
|
|
48
|
+
|
|
49
|
+
OnEnterZone (Other Actor)
|
|
50
|
+
-> Branch: Other Actor == Player?
|
|
51
|
+
True -> Open Door (Timeline drives the rotation) // event-driven, runs once
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Prefer events (overlaps, timers, dispatchers) and Timelines over polling in Tick.
|
|
55
|
+
|
|
56
|
+
### 2. Direct reference + Cast (tight coupling, use sparingly)
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
Overlapped Actor (Actor ref)
|
|
60
|
+
-> Cast To BP_Player
|
|
61
|
+
Cast Failed -> (do nothing)
|
|
62
|
+
Success -> call BP_Player.ApplyDamage(10)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`Cast To` creates a hard reference to that class, which then loads with this Blueprint. Fine when the caller genuinely depends on that type; otherwise prefer an Interface.
|
|
66
|
+
|
|
67
|
+
### 3. Blueprint Interface (decoupled call)
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
// 1. Create BPI_Interactable with function 'Interact(Instigator)'.
|
|
71
|
+
// 2. Add the interface to BP_Door, BP_Chest, BP_Lever and implement 'Interact' in each.
|
|
72
|
+
// 3. Caller, with any Actor ref:
|
|
73
|
+
Player presses Use
|
|
74
|
+
-> Does Object Implement Interface (BPI_Interactable)? // safe check, no Cast/hard ref
|
|
75
|
+
True -> Interact (Message) on Target Actor
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 4. Event Dispatcher (one-to-many broadcast)
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
// In BP_Player: declare Event Dispatcher 'OnHealthChanged (float NewHealth)'.
|
|
82
|
+
TakeDamage -> Set Health -> Call 'OnHealthChanged' (Health) // broadcast
|
|
83
|
+
|
|
84
|
+
// In WBP_HUD BeginPlay: Bind Event to 'OnHealthChanged' -> update health bar.
|
|
85
|
+
// Many listeners can bind; the player never references them.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Common Mistakes
|
|
89
|
+
|
|
90
|
+
- **Cast spaghetti / long load times** — chains of `Cast To` create hard references that pull whole asset trees into memory. Decouple with Interfaces or Dispatchers.
|
|
91
|
+
- **Logic in the Level Blueprint that should be reusable** — it can't be reused across levels. Put it in a Blueprint Class.
|
|
92
|
+
- **`Event Tick` overuse** — every-frame nodes add up fast. Use events, Timers (`Set Timer by Event`), and Timelines instead.
|
|
93
|
+
- **Construction Script doing gameplay** — it runs in the editor on edit/placement; spawning gameplay actors or starting logic there causes editor-only artifacts. Initialize in BeginPlay.
|
|
94
|
+
- **Variable not visible on the instance** — toggle Instance Editable (the eye); to set it before spawn via the Spawn node, also mark "Expose on Spawn".
|
|
95
|
+
- **Interface call did nothing** — the target doesn't implement the interface. Use "Does Implement Interface" before calling, or the Message version, which is safe on non-implementers.
|
|
96
|
+
- **Blueprint graphs that outgrew visual scripting** — past roughly 20 nodes in one function, readability and diffability collapse. Move it to C++.
|
|
97
|
+
|
|
98
|
+
## Reference Files
|
|
99
|
+
|
|
100
|
+
> → Read references/communication.md for the Cast vs Interface vs Event Dispatcher decision guide and step-by-step dispatcher binding
|
|
101
|
+
|
|
102
|
+
Primary docs: [Blueprints Visual Scripting](https://dev.epicgames.com/documentation/en-us/unreal-engine/overview-of-blueprints-visual-scripting-in-unreal-engine).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Related Skills
|
|
107
|
+
|
|
108
|
+
- `/ue-cpp-foundations` — when to drop to C++, and how BP and C++ classes interoperate
|
|
109
|
+
- `/ue-gameplay-framework` — the framework classes these Blueprints usually derive from
|
|
110
|
+
- `/ue-input-system` — the modern way to feed input events into these graphs
|
|
111
|
+
- `/ue-ai-navigation` — AI decision logic that Blueprints trigger
|
|
112
|
+
- `/ue-naming-conventions` — asset prefixes and Content folder layout for these assets
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Checklist
|
|
117
|
+
|
|
118
|
+
Validate before considering the work done:
|
|
119
|
+
|
|
120
|
+
- [ ] No `Cast To` chain creates a hard reference that could be an Interface call
|
|
121
|
+
- [ ] `Event Tick` is unused, or its per-frame cost is justified and measured
|
|
122
|
+
- [ ] Reusable logic lives in a Blueprint Class, not the Level Blueprint
|
|
123
|
+
- [ ] Construction Script does editor-time setup only, with no gameplay side effects
|
|
124
|
+
- [ ] Conventions in `docs/unreal/project-context.md` were read and followed
|
|
125
|
+
- [ ] The Common Mistakes section of this skill was reviewed against the change
|
|
126
|
+
|
|
127
|
+
**PASS** — every item holds. **CONCERNS** — the work stands but at least one item is unresolved and worth flagging to the user. **FAIL** — an item is violated in a way that breaks correctness, load times or the frame budget; fix it before handing the work over.
|
|
128
|
+
|
|
129
|
+
## Next Steps
|
|
130
|
+
|
|
131
|
+
- `/ue-cpp-foundations` — migrate any graph that outgrew visual scripting
|
|
132
|
+
- `/perf-profile` — measure Blueprint tick and load cost
|
|
133
|
+
- `/code-review` — architectural and quality review of the change
|
|
134
|
+
- `/commit` — conventional commit once the change is verified
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
> Adapted from the `unreal-blueprints` skill in [awesome-gamedev-agent-skills](https://github.com/gamedev-skills/awesome-gamedev-agent-skills) (Apache-2.0). Cross-skill references were remapped to Arcane slash commands.
|
|
2
|
+
|
|
3
|
+
# Blueprint communication: Cast vs Interface vs Event Dispatcher (UE 5.8)
|
|
4
|
+
|
|
5
|
+
Depth for `/ue-blueprints`. The three ways Blueprints talk to each other, when to use each,
|
|
6
|
+
and the gotchas. Verified against the Blueprints Visual Scripting and Blueprint Communications
|
|
7
|
+
documentation.
|
|
8
|
+
|
|
9
|
+
## Decision guide
|
|
10
|
+
|
|
11
|
+
| Method | Direction | Coupling | Use when |
|
|
12
|
+
|--------|-----------|----------|----------|
|
|
13
|
+
| **Direct + Cast To** | caller → known target | hard (loads that class) | you have a reference and genuinely depend on that exact type (e.g. player calls a specific door it owns) |
|
|
14
|
+
| **Blueprint Interface** | caller → any implementer | loose (no hard ref) | many unrelated types share a verb (Interact, Damage, Save) and the caller shouldn't know concrete types |
|
|
15
|
+
| **Event Dispatcher** | source → many listeners | loose (listeners find source) | one event, many reactions (health changed → HUD + audio + achievements) |
|
|
16
|
+
|
|
17
|
+
Rule of thumb: **Cast down, broadcast up.** A manager can Cast to things it owns; a low-level
|
|
18
|
+
actor should broadcast a Dispatcher rather than reach up to its owner.
|
|
19
|
+
|
|
20
|
+
## Casting — the cost
|
|
21
|
+
|
|
22
|
+
`Cast To BP_X` adds `BP_X` (and its dependencies) to this Blueprint's load references. A web of
|
|
23
|
+
casts inflates memory and load times and is a common cause of "why does my small Blueprint pull
|
|
24
|
+
in half the game". Use it where the dependency is real; otherwise prefer an interface.
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
Some Actor ref -> Cast To BP_Enemy
|
|
28
|
+
Cast Failed (exec) -> skip // always handle failure; a wrong-type ref returns invalid
|
|
29
|
+
As BP_Enemy (success) -> call enemy-specific function
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Blueprint Interface — decoupled verbs
|
|
33
|
+
|
|
34
|
+
1. Content Browser → Blueprint → **Blueprint Interface** (e.g. `BPI_Interactable`).
|
|
35
|
+
2. Add a function signature, e.g. `Interact(AActor* Instigator)`. (Interfaces declare signatures
|
|
36
|
+
only — no node implementation in the interface asset.)
|
|
37
|
+
3. In each implementer (BP_Door, BP_Chest): Class Settings → **Implemented Interfaces** → add
|
|
38
|
+
`BPI_Interactable`, then implement the `Interact` event in its Event Graph.
|
|
39
|
+
4. Caller, holding any `AActor` reference:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
-> Does Object Implement Interface (BPI_Interactable)? // optional guard
|
|
43
|
+
True -> Interact (Message) [Target = the actor] // 'Message' node is safe even if not implemented
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The "Message" call node does nothing on actors that don't implement the interface, so it never
|
|
47
|
+
errors — unlike a Cast that fails.
|
|
48
|
+
|
|
49
|
+
## Event Dispatcher — one-to-many
|
|
50
|
+
|
|
51
|
+
Declare on the source Blueprint (e.g. `BP_Player`): My Blueprint panel → Event Dispatchers →
|
|
52
|
+
add `OnHealthChanged` with a `float NewHealth` input.
|
|
53
|
+
|
|
54
|
+
Broadcast it where the state changes:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
ApplyDamage -> Set Health (clamp >= 0) -> Call 'OnHealthChanged' (NewHealth = Health)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Bind from any listener that has a reference to the source:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
WBP_HUD :: Event Construct
|
|
64
|
+
-> Get Player Pawn -> Cast To BP_Player
|
|
65
|
+
-> Bind Event to 'OnHealthChanged' [Event = custom 'HandleHealth(NewHealth)']
|
|
66
|
+
|
|
67
|
+
HandleHealth(NewHealth) -> Set Progress Bar Percent = NewHealth / MaxHealth
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- Multiple listeners can bind to the same dispatcher; all are called on broadcast.
|
|
71
|
+
- **Unbind** (`Unbind Event from ...`) when a listener is destroyed/hidden to avoid stale binds.
|
|
72
|
+
- Dispatchers are the Blueprint equivalent of a C++ multicast delegate
|
|
73
|
+
(`DECLARE_DYNAMIC_MULTICAST_DELEGATE`), so the same actor's event can be bound from C++ too.
|
|
74
|
+
|
|
75
|
+
## Gotchas
|
|
76
|
+
|
|
77
|
+
- Binding inside `Event Construct`/`BeginPlay` requires the source to already exist; for
|
|
78
|
+
spawn-order issues, bind after you spawn the source, or have the source broadcast an initial
|
|
79
|
+
value once listeners are known.
|
|
80
|
+
- Interface functions with return values are implemented as functions (not events) on the
|
|
81
|
+
implementer; pure interface calls can't have exec pins.
|
|
82
|
+
- Casting a soft reference forces a synchronous load; prefer `Async Load Asset` for soft refs.
|