claude-code-arcane 2.3.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.
Files changed (103) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +54 -6
  3. package/agents/game/ue-blueprint-specialist.md +125 -0
  4. package/agents/game/ue-gas-specialist.md +133 -0
  5. package/agents/game/ue-umg-specialist.md +131 -0
  6. package/dist/cli.js +5 -0
  7. package/docs/SKILLS-CATALOG.md +42 -3
  8. package/docs/USER-GUIDE.md +2 -2
  9. package/hooks/detect-unreal.sh +90 -0
  10. package/package.json +1 -1
  11. package/profiles/unreal-dev.yaml +97 -0
  12. package/rules/gamedev/unreal-code.md +125 -0
  13. package/skills/install-mcp/SKILL.md +135 -46
  14. package/skills/install-mcp/references/unreal-operations.md +55 -0
  15. package/skills/ue-actor-component-architecture/SKILL.md +509 -0
  16. package/skills/ue-actor-component-architecture/references/actor-lifecycle.md +301 -0
  17. package/skills/ue-actor-component-architecture/references/component-types.md +592 -0
  18. package/skills/ue-ai-navigation/SKILL.md +526 -0
  19. package/skills/ue-ai-navigation/references/behavior-tree-patterns.md +392 -0
  20. package/skills/ue-ai-navigation/references/behavior-tree-workflow.md +107 -0
  21. package/skills/ue-ai-navigation/references/custom-bttask.md +104 -0
  22. package/skills/ue-ai-navigation/references/eqs-reference.md +423 -0
  23. package/skills/ue-animation-system/SKILL.md +521 -0
  24. package/skills/ue-animation-system/references/anim-notify-reference.md +486 -0
  25. package/skills/ue-animation-system/references/locomotion-setup.md +550 -0
  26. package/skills/ue-async-threading/SKILL.md +433 -0
  27. package/skills/ue-async-threading/references/thread-safety-guide.md +213 -0
  28. package/skills/ue-async-threading/references/threading-patterns.md +345 -0
  29. package/skills/ue-audio-system/SKILL.md +527 -0
  30. package/skills/ue-audio-system/references/audio-setup-patterns.md +700 -0
  31. package/skills/ue-blueprints/SKILL.md +134 -0
  32. package/skills/ue-blueprints/references/communication.md +82 -0
  33. package/skills/ue-character-movement/SKILL.md +475 -0
  34. package/skills/ue-character-movement/references/cmc-extension-patterns.md +335 -0
  35. package/skills/ue-character-movement/references/movement-pipeline.md +189 -0
  36. package/skills/ue-cpp-foundations/SKILL.md +533 -0
  37. package/skills/ue-cpp-foundations/references/components-and-gc.md +107 -0
  38. package/skills/ue-cpp-foundations/references/container-patterns.md +544 -0
  39. package/skills/ue-cpp-foundations/references/delegate-patterns.md +497 -0
  40. package/skills/ue-cpp-foundations/references/gameplay-classes-cpp.md +136 -0
  41. package/skills/ue-cpp-foundations/references/property-specifiers.md +306 -0
  42. package/skills/ue-data-assets-tables/SKILL.md +527 -0
  43. package/skills/ue-data-assets-tables/references/asset-loading-patterns.md +306 -0
  44. package/skills/ue-data-assets-tables/references/data-driven-design.md +378 -0
  45. package/skills/ue-editor-tools/SKILL.md +523 -0
  46. package/skills/ue-editor-tools/references/detail-customization-patterns.md +395 -0
  47. package/skills/ue-editor-tools/references/editor-module-setup.md +480 -0
  48. package/skills/ue-game-features/SKILL.md +477 -0
  49. package/skills/ue-game-features/references/experience-system.md +222 -0
  50. package/skills/ue-game-features/references/game-feature-patterns.md +308 -0
  51. package/skills/ue-gameplay-abilities/SKILL.md +518 -0
  52. package/skills/ue-gameplay-abilities/references/ability-task-reference.md +391 -0
  53. package/skills/ue-gameplay-abilities/references/gameplay-effect-reference.md +397 -0
  54. package/skills/ue-gameplay-abilities/references/gas-setup-patterns.md +369 -0
  55. package/skills/ue-gameplay-framework/SKILL.md +466 -0
  56. package/skills/ue-gameplay-framework/references/framework-class-map.md +243 -0
  57. package/skills/ue-input-system/SKILL.md +394 -0
  58. package/skills/ue-input-system/references/cpp-setup.md +131 -0
  59. package/skills/ue-input-system/references/enhanced-input-workflow.md +117 -0
  60. package/skills/ue-input-system/references/input-action-reference.md +731 -0
  61. package/skills/ue-mass-entity/SKILL.md +476 -0
  62. package/skills/ue-mass-entity/references/mass-entity-patterns.md +319 -0
  63. package/skills/ue-mass-entity/references/mass-fragment-reference.md +119 -0
  64. package/skills/ue-materials-rendering/SKILL.md +526 -0
  65. package/skills/ue-materials-rendering/references/material-parameter-reference.md +216 -0
  66. package/skills/ue-materials-rendering/references/post-process-settings.md +383 -0
  67. package/skills/ue-module-build-system/SKILL.md +487 -0
  68. package/skills/ue-module-build-system/references/build-cs-reference.md +418 -0
  69. package/skills/ue-module-build-system/references/common-build-errors.md +381 -0
  70. package/skills/ue-naming-conventions/SKILL.md +142 -0
  71. package/skills/ue-naming-conventions/references/asset-name-modifiers.md +233 -0
  72. package/skills/ue-naming-conventions/references/content-structure.md +83 -0
  73. package/skills/ue-networking-replication/SKILL.md +452 -0
  74. package/skills/ue-networking-replication/references/replication-patterns.md +526 -0
  75. package/skills/ue-networking-replication/references/rpc-decision-guide.md +393 -0
  76. package/skills/ue-niagara-effects/SKILL.md +531 -0
  77. package/skills/ue-niagara-effects/references/niagara-data-interfaces.md +491 -0
  78. package/skills/ue-niagara-effects/references/niagara-parameter-types.md +153 -0
  79. package/skills/ue-niagara-effects/references/niagara-workflow.md +115 -0
  80. package/skills/ue-packaging/SKILL.md +116 -0
  81. package/skills/ue-physics-collision/SKILL.md +423 -0
  82. package/skills/ue-physics-collision/references/collision-channel-setup.md +218 -0
  83. package/skills/ue-physics-collision/references/trace-patterns.md +499 -0
  84. package/skills/ue-procedural-generation/SKILL.md +505 -0
  85. package/skills/ue-procedural-generation/references/pcg-node-reference.md +381 -0
  86. package/skills/ue-procedural-generation/references/procedural-mesh-patterns.md +940 -0
  87. package/skills/ue-project-context/SKILL.md +305 -0
  88. package/skills/ue-sequencer-cinematics/SKILL.md +506 -0
  89. package/skills/ue-sequencer-cinematics/references/sequencer-patterns.md +629 -0
  90. package/skills/ue-serialization-savegames/SKILL.md +524 -0
  91. package/skills/ue-serialization-savegames/references/save-system-architecture.md +705 -0
  92. package/skills/ue-state-trees/SKILL.md +489 -0
  93. package/skills/ue-state-trees/references/state-tree-mass-integration.md +184 -0
  94. package/skills/ue-state-trees/references/state-tree-patterns.md +321 -0
  95. package/skills/ue-testing-debugging/SKILL.md +520 -0
  96. package/skills/ue-testing-debugging/references/automation-test-patterns.md +387 -0
  97. package/skills/ue-testing-debugging/references/profiling-commands.md +357 -0
  98. package/skills/ue-ui-umg-slate/SKILL.md +431 -0
  99. package/skills/ue-ui-umg-slate/references/common-ui-setup.md +484 -0
  100. package/skills/ue-ui-umg-slate/references/widget-types.md +487 -0
  101. package/skills/ue-world-level-streaming/SKILL.md +518 -0
  102. package/skills/ue-world-level-streaming/references/streaming-patterns.md +414 -0
  103. package/templates/gamedev/unreal-project-context.md +107 -0
@@ -0,0 +1,301 @@
1
+ # Actor Lifecycle Reference
2
+
3
+ Full event ordering for `AActor` from spawn through destruction, with component events interleaved, network notes, and what is safe to do at each stage.
4
+
5
+ Source of truth: `Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h` — the class-level Doxygen block starting at line 222 documents the authoritative order of initialization virtual functions.
6
+
7
+ ---
8
+
9
+ ## Complete Lifecycle Diagram
10
+
11
+ ```
12
+ SPAWN / LEVEL LOAD
13
+ ──────────────────────────────────────────────────────────────────────────
14
+ AActor::AActor()
15
+ Called on the Class Default Object (CDO) and on every instance.
16
+ World = nullptr. No other actors are accessible.
17
+ ┌─ CreateDefaultSubobject<T>() OK: creates owned components
18
+ ├─ SetRootComponent() OK: sets hierarchy root
19
+ ├─ PrimaryActorTick.* OK: configure tick
20
+ └─ Default UPROPERTY values OK
21
+
22
+ [Statically placed actors only — loaded from level file]
23
+ UObject::PostLoad()
24
+ Normal UObject serialization. Called in editor and during gameplay for
25
+ map-placed actors. NOT called for freshly spawned actors.
26
+
27
+ UActorComponent::OnComponentCreated()
28
+ Called for native (C++) components when the actor is spawned in editor
29
+ or gameplay. Not called for components loaded from a saved level.
30
+
31
+ AActor::PreRegisterAllComponents()
32
+ For actors that have a native root component. Components are about to
33
+ be registered with the world scene.
34
+
35
+ UActorComponent::RegisterComponent() [once per component]
36
+ Creates the physical and visual representation of each component
37
+ in the world (render proxy, physics body). May be spread across frames
38
+ for large levels.
39
+
40
+ AActor::PostRegisterAllComponents()
41
+ All components are now registered. Called in editor and gameplay.
42
+ Last function called in all initialization paths.
43
+
44
+ [Spawned actors only — NOT level-placed]
45
+ AActor::PostActorCreated()
46
+ Called right before construction (UserConstructionScript / OnConstruction).
47
+ Not called for level-placed actors.
48
+
49
+ AActor::UserConstructionScript()
50
+ Blueprint construction script executes here.
51
+
52
+ AActor::OnConstruction()
53
+ C++ hook called at end of ExecuteConstruction (after Blueprint CS).
54
+ All Blueprint-created components are fully created and registered at
55
+ this point. In gameplay, only called for spawned actors.
56
+ Can be re-run in editor when Blueprint is recompiled.
57
+
58
+ ──────────────────────────────────────────────────────────────────────────
59
+ GAMEPLAY INITIALIZATION (not in editor CDO pass)
60
+ ──────────────────────────────────────────────────────────────────────────
61
+ AActor::PreInitializeComponents()
62
+ Called before InitializeComponent on any component. Override to do
63
+ pre-init setup that doesn't belong in the constructor.
64
+
65
+ UActorComponent::Activate() [if bAutoActivate == true]
66
+ Component self-activates during the init sequence.
67
+
68
+ UActorComponent::InitializeComponent() [if bWantsInitializeComponent == true]
69
+ Called once per gameplay session per component. Override to do
70
+ one-time setup that requires the world to exist.
71
+
72
+ AActor::PostInitializeComponents()
73
+ All components have been initialized. World exists. Other actors that
74
+ were in the level at load time are accessible.
75
+ ┌─ Safe: bind delegates to own components
76
+ ├─ Safe: read/write component state
77
+ ├─ Safe: access GetWorld()
78
+ └─ NOT safe: assume BeginPlay-dependent state in other actors
79
+
80
+ ──────────────────────────────────────────────────────────────────────────
81
+ PLAY (level has started ticking)
82
+ ──────────────────────────────────────────────────────────────────────────
83
+ AActor::BeginPlay()
84
+ ├─ UActorComponent::BeginPlay() [each component, in order]
85
+ │ Begins play for each registered, initialized component.
86
+ │ Component BeginPlay runs BEFORE Actor BeginPlay completes
87
+ │ if called from within AActor::BeginPlay via Super chain.
88
+ └─ Full game state is accessible here
89
+
90
+ AActor::Tick(float DeltaTime) [every frame, if bCanEverTick]
91
+ ├─ UActorComponent::TickComponent() [each ticking component]
92
+ └─ Tick groups control ordering (see tick group table below)
93
+
94
+ ──────────────────────────────────────────────────────────────────────────
95
+ TERMINATION
96
+ ──────────────────────────────────────────────────────────────────────────
97
+ AActor::EndPlay(EEndPlayReason::Type)
98
+ ├─ UActorComponent::EndPlay() [each component]
99
+ └─ UActorComponent::UninitializeComponent()
100
+
101
+ AActor::Destroyed()
102
+ Called when the actor is being deleted. Avoid complex logic here.
103
+ The actor is about to be handed to the garbage collector.
104
+
105
+ [GC pass — memory freed]
106
+ ```
107
+
108
+ ---
109
+
110
+ ## EEndPlayReason Values
111
+
112
+ Declared in `Engine/EngineTypes.h`:
113
+
114
+ ```cpp
115
+ namespace EEndPlayReason
116
+ {
117
+ enum Type : int
118
+ {
119
+ Destroyed, // Actor::Destroy() was called explicitly
120
+ LevelTransition, // A level transition (map change) is occurring
121
+ EndPlayInEditor, // PIE session ended in the editor
122
+ RemovedFromWorld, // Level streaming unloaded the actor's sublevel
123
+ Quit, // The game application is shutting down
124
+ };
125
+ }
126
+ ```
127
+
128
+ ### Decision matrix for EndPlay cleanup
129
+
130
+ | EndPlayReason | Play effects? | Save state? | Release resources? |
131
+ |---|---|---|---|
132
+ | `Destroyed` | Yes (optional) | If persistent | Yes |
133
+ | `LevelTransition` | No | If needed | Yes |
134
+ | `EndPlayInEditor` | No | No | Yes |
135
+ | `RemovedFromWorld` | No | If needed | Yes |
136
+ | `Quit` | No | If needed | Yes |
137
+
138
+ Always clear timers in EndPlay regardless of reason:
139
+
140
+ ```cpp
141
+ void AMyActor::EndPlay(const EEndPlayReason::Type EndPlayReason)
142
+ {
143
+ GetWorld()->GetTimerManager().ClearAllTimersForObject(this);
144
+ Super::EndPlay(EndPlayReason); // Required
145
+ }
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Tick Group Ordering
151
+
152
+ Tick groups are defined in `Engine/Source/Runtime/Engine/Classes/Engine/EngineBaseTypes.h`:
153
+
154
+ ```
155
+ Frame start
156
+ │
157
+ ├─ TG_PrePhysics (default for actors and components)
158
+ │ Input processing, movement requests, AI decisions
159
+ │
160
+ ├─ TG_StartPhysics (internal — physics simulation begins)
161
+ │
162
+ ├─ TG_DuringPhysics (async; runs while physics is simulating)
163
+ │ Read-only queries on physics state from previous frame
164
+ │
165
+ ├─ TG_EndPhysics (physics simulation completes)
166
+ │ First point where this frame's physics results are readable
167
+ │
168
+ ├─ TG_PostPhysics (after physics settles)
169
+ │ Spring arm, camera follow, IK solvers, cloth, ragdoll read
170
+ │
171
+ └─ TG_PostUpdateWork (last tick group)
172
+ Final state queries, rendering preparation
173
+ Frame end
174
+ ```
175
+
176
+ Setting the tick group:
177
+
178
+ ```cpp
179
+ AMyActor::AMyActor()
180
+ {
181
+ PrimaryActorTick.bCanEverTick = true;
182
+ PrimaryActorTick.TickGroup = TG_PostPhysics;
183
+ }
184
+
185
+ UMyComponent::UMyComponent()
186
+ {
187
+ PrimaryComponentTick.bCanEverTick = true;
188
+ PrimaryComponentTick.TickGroup = TG_PostPhysics;
189
+ }
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Network Lifecycle Differences
195
+
196
+ For replicated actors, the lifecycle deviates from the single-player sequence.
197
+
198
+ ### Server (authority)
199
+
200
+ The server runs the complete lifecycle described above. `BeginPlay` is called normally.
201
+
202
+ ### Client (simulated proxy)
203
+
204
+ 1. Actor data is received from the server over the network.
205
+ 2. The actor is created locally by the net driver.
206
+ 3. **`PostNetReceive`** is called after properties are received.
207
+ 4. **`OnRep_*` functions** are called for `UPROPERTY(ReplicatedUsing=...)` fields.
208
+ 5. **`BeginPlay` is called**, but timing is determined by the network — it may be delayed compared to the server, and happens after the actor's initial replicated state is applied.
209
+
210
+ Key consequence: never assume that `BeginPlay` on the client sees the same initial property values as the server's `BeginPlay`. The server may have changed properties after initial spawn before the client even received the actor.
211
+
212
+ ### Replicated actor spawn sequence (client side)
213
+
214
+ ```
215
+ Net driver receives actor channel data
216
+ → UActorComponent::OnComponentCreated() [native components]
217
+ → AActor::PostActorCreated()
218
+ → AActor::PostInitializeComponents()
219
+ → PostNetReceive() / OnRep_* calls for initial property batch
220
+ → AActor::BeginPlay()
221
+ ```
222
+
223
+ ### Child actors in multiplayer
224
+
225
+ `UChildActorComponent` actors have their `BeginPlay` delayed until after their parent actor's `BeginPlay` in some cases. Do not assume a child actor is BegunPlay when the parent is in `PostInitializeComponents`.
226
+
227
+ ---
228
+
229
+ ## Deferred Spawn Sequence
230
+
231
+ `SpawnActorDeferred` pauses the lifecycle between construction and initialization, giving you a window to configure the actor before `BeginPlay` fires.
232
+
233
+ ```
234
+ SpawnActorDeferred<T>() called
235
+ → AActor::AActor() Constructor runs
236
+ → CreateDefaultSubobject calls Components created
237
+ → AActor::PostActorCreated() Normal post-construction hook
238
+
239
+ [Actor exists but is NOT initialized — BeginPlay has NOT fired]
240
+ [Window: set properties on the actor here]
241
+
242
+ Actor->FinishSpawning(Transform)
243
+ → AActor::OnConstruction()
244
+ → AActor::PreInitializeComponents()
245
+ → UActorComponent::InitializeComponent()
246
+ → AActor::PostInitializeComponents()
247
+ → AActor::BeginPlay() Now fires
248
+ ```
249
+
250
+ This pattern is essential when:
251
+ - The actor's `BeginPlay` reads configuration data that must be set before it runs
252
+ - You are spawning from a DataAsset or configuration object
253
+ - You need to prevent BeginPlay side effects (spawning sub-actors, playing audio) until fully configured
254
+
255
+ ---
256
+
257
+ ## Component Lifecycle Within an Actor
258
+
259
+ Each `UActorComponent` has its own parallel lifecycle that mirrors the actor's:
260
+
261
+ ```
262
+ UActorComponent constructed (via CreateDefaultSubobject or NewObject)
263
+ → OnComponentCreated() [first time, not on level-placed actors]
264
+ → RegisterComponent() [gets world presence]
265
+ → OnRegister() [scene is set; before render/physics state]
266
+ → CreateRenderState_Concurrent() [render proxy created]
267
+ → OnCreatePhysicsState() [physics body created]
268
+ → InitializeComponent() [if bWantsInitializeComponent]
269
+ → Activate() [if bAutoActivate]
270
+ → BeginPlay()
271
+
272
+ → TickComponent() [every frame if ticking]
273
+
274
+ → EndPlay()
275
+ → UninitializeComponent()
276
+ → OnUnregister()
277
+ → DestroyRenderState_Concurrent()
278
+ → OnDestroyPhysicsState()
279
+ → DestroyComponent() [marks for GC]
280
+ ```
281
+
282
+ `bHasBegunPlay`, `bHasBeenInitialized`, `bHasBeenCreated` are the runtime flags you can check on a `UActorComponent` instance to know where it is in this sequence.
283
+
284
+ ---
285
+
286
+ ## What Is Safe At Each Stage
287
+
288
+ | Stage | GetWorld() | Other Actors | Own Components | Game State |
289
+ |---|---|---|---|---|
290
+ | Constructor | No (nullptr on CDO) | No | Create only | No |
291
+ | PostLoad | Yes (editor/runtime) | No | Read only | No |
292
+ | OnComponentCreated | No | No | Yes | No |
293
+ | RegisterComponent | No | No | Yes | No |
294
+ | PostActorCreated | Yes | Limited | Yes | No |
295
+ | OnConstruction | Yes | Limited | Yes | No |
296
+ | PreInitializeComponents | Yes | Yes | Yes | Partial |
297
+ | PostInitializeComponents | Yes | Yes | Yes | Partial |
298
+ | BeginPlay | Yes | Yes | Yes | Yes |
299
+ | Tick | Yes | Yes | Yes | Yes |
300
+ | EndPlay | Yes | Carefully | Yes | Shutting down |
301
+ | Destroyed | Yes | No | Partial | No |