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,491 @@
1
+ # Niagara Data Interfaces — Built-In Reference
2
+
3
+ Data interfaces (DIs) extend Niagara scripts with external data sources that cannot be represented
4
+ as simple scalar/vector parameters. Each DI is a `UObject` subclass derived from
5
+ `UNiagaraDataInterface` (`NiagaraDataInterface.h`) or, for the base type, from
6
+ `UNiagaraDataInterfaceBase` (`NiagaraCore/NiagaraDataInterfaceBase.h`).
7
+
8
+ DIs appear in the Niagara editor as `User.*` parameters of DI type and are bound at runtime from
9
+ C++ using `UNiagaraFunctionLibrary` helpers or `SetVariableObject`. All DI classes listed here are
10
+ found under `Engine/Plugins/FX/Niagara/Source/Niagara/`.
11
+
12
+ ---
13
+
14
+ ## Mesh DIs
15
+
16
+ ### UNiagaraDataInterfaceSkeletalMesh
17
+ **Header**: `Classes/NiagaraDataInterfaceSkeletalMesh.h`
18
+ **Module**: `Niagara`
19
+ **Sim target**: CPU + GPU (partial)
20
+
21
+ Samples positions, normals, UV coordinates, and bone transforms from a live
22
+ `USkeletalMeshComponent`. The mesh is skinned at the moment of sampling — particles can follow
23
+ bones or spawn from surface regions.
24
+
25
+ **Runtime binding from C++**:
26
+ ```cpp
27
+ // Preferred: bind by component reference.
28
+ UNiagaraFunctionLibrary::OverrideSystemUserVariableSkeletalMeshComponent(
29
+ NiagaraComp, TEXT("User.SourceMesh"), SkeletalMeshComp
30
+ );
31
+
32
+ // Restrict to specific bones (destructive modification of DI instance data).
33
+ UNiagaraFunctionLibrary::SetSkeletalMeshDataInterfaceFilteredBones(
34
+ NiagaraComp, TEXT("User.SourceMesh"), { FName("spine_01"), FName("head") }
35
+ );
36
+
37
+ // Restrict to sampling regions defined in the SkeletalMesh asset's LOD settings.
38
+ UNiagaraFunctionLibrary::SetSkeletalMeshDataInterfaceSamplingRegions(
39
+ NiagaraComp, TEXT("User.SourceMesh"), { FName("UpperBody") }
40
+ );
41
+
42
+ // Restrict to named sockets only.
43
+ UNiagaraFunctionLibrary::SetSkeletalMeshDataInterfaceFilteredSockets(
44
+ NiagaraComp, TEXT("User.SourceMesh"), { FName("foot_l_socket") }
45
+ );
46
+
47
+ // Direct access for advanced mutation.
48
+ UNiagaraDataInterfaceSkeletalMesh* SkelDI =
49
+ UNiagaraFunctionLibrary::GetDataInterface<UNiagaraDataInterfaceSkeletalMesh>(
50
+ NiagaraComp, FName("User.SourceMesh")
51
+ );
52
+ ```
53
+
54
+ **Key properties** (set in Niagara editor or via direct DI mutation):
55
+ - `SourceMode` — `Default`, `Source`, `AttachParent`, `DefaultMesh`, `MeshParameterBinding`
56
+ - `SoftSourceActor` — soft actor reference; the DI resolves its `USkeletalMeshComponent`
57
+ - `FilteredBones`, `FilteredSockets`, `SamplingRegions` — sampling restrictions
58
+ - `bRequireCurrentFrameData` — whether to wait for skinning to complete this frame
59
+
60
+ **Notes**:
61
+ - Requires `bAllowCPUAccess` on the `USkeletalMesh` asset for CPU sampling.
62
+ - Pre-skinned vertex positions (`bUsesPreSkinnedVerts`) require `bCacheSampledData` on the
63
+ mesh's LOD settings.
64
+ - Not all functions work on GPU sim; check Niagara editor warnings.
65
+
66
+ ---
67
+
68
+ ### UNiagaraDataInterfaceStaticMesh
69
+ **Header**: `Internal/DataInterface/NiagaraDataInterfaceStaticMesh.h`
70
+ **Module**: `Niagara`
71
+ **Sim target**: CPU + GPU (partial)
72
+
73
+ Samples vertex positions, normals, UV coordinates, and socket transforms from a static mesh.
74
+ Supports per-section filtering and instanced static mesh instance selection.
75
+
76
+ **Runtime binding from C++**:
77
+ ```cpp
78
+ // Bind by component.
79
+ UNiagaraFunctionLibrary::OverrideSystemUserVariableStaticMeshComponent(
80
+ NiagaraComp, TEXT("User.ScatterMesh"), StaticMeshComp
81
+ );
82
+
83
+ // Bind by raw asset.
84
+ UNiagaraFunctionLibrary::OverrideSystemUserVariableStaticMesh(
85
+ NiagaraComp, TEXT("User.ScatterMesh"), MyStaticMesh
86
+ );
87
+
88
+ // Set which ISM instance to read from.
89
+ UNiagaraDataInterfaceStaticMesh::SetNiagaraStaticMeshDIInstanceIndex(
90
+ NiagaraComp, FName("User.ScatterMesh"), InstanceIndex
91
+ );
92
+ ```
93
+
94
+ **Key properties**:
95
+ - `SourceMode` — `ENDIStaticMesh_SourceMode::Default/Source/AttachParent/DefaultMeshOnly/MeshParameterBinding`
96
+ - `DefaultMesh` — fallback `UStaticMesh*` used when no runtime override is bound
97
+ - `SectionFilter.AllowedMaterialSlots` — restricts triangle sampling to specific material slots
98
+ - `LODIndex` — which LOD to sample; negative index counts back from highest LOD
99
+ - `bCaptureTransformsPerFrame` — update mesh-to-world transform each tick (default true)
100
+ - `bAllowSamplingFromStreamingLODs` — allows sampling from streaming LODs
101
+
102
+ **Notes**:
103
+ - Requires `bAllowCPUAccess` on the static mesh asset for CPU sampling.
104
+ - Set `bAllowSamplingFromStreamingLODs=false` on mobile to avoid streaming stalls.
105
+
106
+ ---
107
+
108
+ ## Curve DIs
109
+
110
+ All curve DIs derive from `UNiagaraDataInterfaceCurveBase` and provide a `SampleCurve(time)` function
111
+ to Niagara scripts. Internally they build a LUT (look-up table) at load time for GPU sampling.
112
+
113
+ ### UNiagaraDataInterfaceCurve
114
+ **Header**: `Classes/NiagaraDataInterfaceCurve.h`
115
+ **Niagara type**: "Curve for Floats"
116
+ **Output**: `float`
117
+
118
+ ```cpp
119
+ // Mutate keys at runtime (rebuilds LUT).
120
+ UNiagaraDataInterfaceCurve* CurveDI =
121
+ UNiagaraFunctionLibrary::GetDataInterface<UNiagaraDataInterfaceCurve>(
122
+ NiagaraComp, FName("User.SpeedCurve")
123
+ );
124
+ if (CurveDI)
125
+ {
126
+ CurveDI->Curve.Reset();
127
+ CurveDI->Curve.AddKey(0.f, 0.f);
128
+ CurveDI->Curve.AddKey(0.5f, 1.f);
129
+ CurveDI->Curve.AddKey(1.f, 0.f);
130
+ // UNiagaraDataInterface derives from UObject, not UActorComponent —
131
+ // MarkRenderStateDirty() does not exist on this hierarchy.
132
+ // UpdateLUT() rebuilds the GPU look-up table (WITH_EDITORONLY_DATA only).
133
+ #if WITH_EDITORONLY_DATA
134
+ CurveDI->UpdateLUT();
135
+ #endif
136
+ }
137
+ ```
138
+
139
+ ### UNiagaraDataInterfaceVectorCurve
140
+ **Header**: `Classes/NiagaraDataInterfaceVectorCurve.h`
141
+ **Niagara type**: "Curve for Vectors"
142
+ **Output**: `FVector` (XYZ channels via three `FRichCurve`)
143
+
144
+ ```cpp
145
+ UNiagaraDataInterfaceVectorCurve* VecCurveDI =
146
+ UNiagaraFunctionLibrary::GetDataInterface<UNiagaraDataInterfaceVectorCurve>(
147
+ NiagaraComp, FName("User.VelocityCurve")
148
+ );
149
+ // Properties: XCurve, YCurve, ZCurve (each FRichCurve).
150
+ ```
151
+
152
+ ### UNiagaraDataInterfaceColorCurve
153
+ **Header**: `Classes/NiagaraDataInterfaceColorCurve.h`
154
+ **Niagara type**: "Curve for Colors"
155
+ **Output**: `FLinearColor` (RGBA channels via four `FRichCurve`)
156
+
157
+ ### UNiagaraDataInterfaceVector2DCurve
158
+ **Header**: `Classes/NiagaraDataInterfaceVector2DCurve.h`
159
+ **Niagara type**: "Curve for Vector 2Ds"
160
+ **Output**: `FVector2D`
161
+
162
+ ### UNiagaraDataInterfaceVector4Curve
163
+ **Header**: `Classes/NiagaraDataInterfaceVector4Curve.h`
164
+ **Niagara type**: "Curve for Vector 4s"
165
+ **Output**: `FVector4`
166
+
167
+ ---
168
+
169
+ ## Array DIs
170
+
171
+ Array DIs hold a `TArray` of typed data that Niagara scripts index into at runtime. They are the
172
+ primary mechanism for pushing per-frame C++ arrays into GPU/CPU simulations.
173
+
174
+ All array DIs derive from `UNiagaraDataInterfaceArray` (`Classes/NiagaraDataInterfaceArray.h`).
175
+
176
+ | DI Class | Element Type | Header |
177
+ |---|---|---|
178
+ | `UNiagaraDataInterfaceArrayFloat` | `float` | `Classes/NiagaraDataInterfaceArrayFloat.h` |
179
+ | `UNiagaraDataInterfaceArrayFloat2` | `FVector2f` (internal) / `FVector2D` (API) | same |
180
+ | `UNiagaraDataInterfaceArrayFloat3` | `FVector3f` (internal) / `FVector` (API) | same |
181
+ | `UNiagaraDataInterfaceArrayFloat4` | `FVector4f` (internal) / `FVector4` (API) | same |
182
+ | `UNiagaraDataInterfaceArrayPosition` | `FNiagaraPosition` | same |
183
+ | `UNiagaraDataInterfaceArrayColor` | `FLinearColor` | same |
184
+ | `UNiagaraDataInterfaceArrayQuat` | `FQuat4f` (internal) / `FQuat` (API) | same |
185
+ | `UNiagaraDataInterfaceArrayMatrix` | `FMatrix44f` (internal) / `FMatrix` (API) | same |
186
+ | `UNiagaraDataInterfaceArrayInt32` | `int32` | `Classes/NiagaraDataInterfaceArrayInt.h` |
187
+
188
+ **Runtime population from C++** (see also `niagara-parameter-types.md` for full method list):
189
+ ```cpp
190
+ #include "NiagaraDataInterfaceArrayFunctionLibrary.h"
191
+
192
+ TArray<FVector> PositionArray = BuildPositions();
193
+ UNiagaraDataInterfaceArrayFunctionLibrary::SetNiagaraArrayVector(
194
+ NiagaraComp, FName("User.SpawnPositions"), PositionArray
195
+ );
196
+ ```
197
+
198
+ **Direct property access** (avoids function library overhead for large arrays):
199
+ ```cpp
200
+ UNiagaraDataInterfaceArrayFloat* FloatArrayDI =
201
+ UNiagaraFunctionLibrary::GetDataInterface<UNiagaraDataInterfaceArrayFloat>(
202
+ NiagaraComp, FName("User.HeatData")
203
+ );
204
+ if (FloatArrayDI)
205
+ {
206
+ FloatArrayDI->FloatData = MoveTemp(NewFloatData);
207
+ // UNiagaraDataInterface derives from UObject, not UActorComponent —
208
+ // MarkRenderStateDirty() does not exist on this hierarchy.
209
+ // The engine re-uploads array data automatically on the next simulation tick.
210
+ }
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Texture DIs
216
+
217
+ ### UNiagaraDataInterfaceTexture
218
+ **Header**: `Classes/NiagaraDataInterfaceTexture.h`
219
+ **Sim target**: CPU + GPU
220
+
221
+ Samples from a `UTexture2D` or `UTextureRenderTarget2D`. Provides `SampleTexture2D(UV)`.
222
+
223
+ ```cpp
224
+ UNiagaraFunctionLibrary::SetTextureObject(NiagaraComp, TEXT("User.FlowTexture"), MyTexture2D);
225
+ // or via SetVariableTexture:
226
+ NiagaraComp->SetVariableTexture(FName("User.FlowTexture"), MyTexture);
227
+ ```
228
+
229
+ ### UNiagaraDataInterface2DArrayTexture
230
+ **Header**: `Classes/NiagaraDataInterface2DArrayTexture.h`
231
+ **Sim target**: GPU only
232
+
233
+ Samples from a `UTexture2DArray`.
234
+
235
+ ```cpp
236
+ UNiagaraFunctionLibrary::SetTexture2DArrayObject(NiagaraComp, TEXT("User.TexArray"), MyTexArray);
237
+ ```
238
+
239
+ ### UNiagaraDataInterfaceVolumeTexture
240
+ **Header**: `Classes/NiagaraDataInterfaceVolumeTexture.h`
241
+ **Sim target**: GPU only
242
+
243
+ Samples from a `UVolumeTexture`.
244
+
245
+ ```cpp
246
+ UNiagaraFunctionLibrary::SetVolumeTextureObject(NiagaraComp, TEXT("User.DensityVol"), MyVolumeTexture);
247
+ ```
248
+
249
+ ### UNiagaraDataInterfaceCubeTexture
250
+ **Header**: `Classes/NiagaraDataInterfaceCubeTexture.h`
251
+ **Sim target**: GPU only
252
+
253
+ Samples from a `UTextureCube`.
254
+
255
+ ### UNiagaraDataInterfaceRenderTarget2D
256
+ **Header**: `Classes/NiagaraDataInterfaceRenderTarget2D.h`
257
+ **Sim target**: GPU (read/write)
258
+
259
+ Read-write GPU render target. Used for simulation caching and fluid-like effects.
260
+
261
+ ---
262
+
263
+ ## Noise DIs
264
+
265
+ ### UNiagaraDataInterfaceCurlNoise
266
+ **Header**: `Classes/NiagaraDataInterfaceCurlNoise.h`
267
+ **Sim target**: CPU + GPU
268
+
269
+ Provides 3D curl noise for divergence-free velocity fields. No runtime parameters — configure
270
+ `ModificationMode` and `NoiseStrength` in the Niagara editor.
271
+
272
+ ---
273
+
274
+ ## Simulation / Grid DIs
275
+
276
+ ### UNiagaraDataInterfaceGrid2DCollection
277
+ **Header**: `Classes/NiagaraDataInterfaceGrid2DCollection.h`
278
+ **Sim target**: GPU only
279
+
280
+ 2D grid of simulation data (textures). Used for fluid simulation and cellular automata effects.
281
+ Requires GPU sim mode. Not configurable from C++ directly — set up in Niagara editor.
282
+
283
+ ### UNiagaraDataInterfaceGrid3DCollection
284
+ **Header**: `Classes/NiagaraDataInterfaceGrid3DCollection.h`
285
+ **Sim target**: GPU only
286
+
287
+ 3D volumetric grid. Used for Niagara Fluids and volumetric simulations.
288
+
289
+ ### UNiagaraDataInterfaceNeighborGrid3D
290
+ **Header**: `Classes/NiagaraDataInterfaceNeighborGrid3D.h`
291
+ **Sim target**: GPU only
292
+
293
+ Spatial hash grid for neighbor queries between particles.
294
+
295
+ ---
296
+
297
+ ## Collision DIs
298
+
299
+ ### UNiagaraDataInterfaceCollisionQuery
300
+ **Header**: `Classes/NiagaraDataInterfaceCollisionQuery.h`
301
+ **Sim target**: CPU (sync) + GPU (async via HWRT)
302
+
303
+ Allows Niagara particles to perform physics collision traces. CPU mode executes synchronous line
304
+ traces; GPU mode uses hardware ray tracing (HWRT) when available.
305
+
306
+ For GPU HWRT, manage collision groups from C++:
307
+ ```cpp
308
+ // Assign a collision group to a primitive so GPU particles can filter against it.
309
+ UNiagaraFunctionLibrary::SetComponentNiagaraGPURayTracedCollisionGroup(
310
+ this, MyPrimitiveComp, CollisionGroupIndex
311
+ );
312
+
313
+ // Acquire a free collision group index.
314
+ int32 GroupIdx = UNiagaraFunctionLibrary::AcquireNiagaraGPURayTracedCollisionGroup(this);
315
+ // ... assign and use ...
316
+ UNiagaraFunctionLibrary::ReleaseNiagaraGPURayTracedCollisionGroup(this, GroupIdx);
317
+ ```
318
+
319
+ ### UNiagaraDataInterfaceAsyncGpuTrace
320
+ **Header**: `Classes/NiagaraDataInterfaceAsyncGpuTrace.h`
321
+ **Sim target**: GPU only (HWRT)
322
+
323
+ Asynchronous GPU-side ray traces. Results are available in the following frame.
324
+
325
+ ---
326
+
327
+ ## Audio DIs
328
+
329
+ ### UNiagaraDataInterfaceAudio
330
+ **Header**: `Classes/NiagaraDataInterfaceAudio.h`
331
+
332
+ Abstract base for audio-driven data interfaces.
333
+
334
+ ### UNiagaraDataInterfaceAudioOscilloscope
335
+ **Header**: `Classes/NiagaraDataInterfaceAudioOscilloscope.h`
336
+
337
+ Samples audio waveform (time-domain) data into the particle simulation.
338
+
339
+ ### UNiagaraDataInterfaceAudioSpectrum
340
+ **Header**: `Classes/NiagaraDataInterfaceAudioSpectrum.h`
341
+
342
+ Samples FFT frequency spectrum data. Drive particle effects from audio amplitude.
343
+
344
+ ### UNiagaraDataInterfaceAudioPlayer
345
+ **Header**: `Classes/NiagaraDataInterfaceAudioPlayer.h`
346
+
347
+ Triggers audio events from within a Niagara simulation (e.g., play a sound per particle spawn).
348
+
349
+ ---
350
+
351
+ ## Physics DIs
352
+
353
+ ### UNiagaraDataInterfacePhysicsAsset
354
+ **Header**: `Public/NiagaraDataInterfacePhysicsAsset.h`
355
+
356
+ Exposes physics asset body transforms for collision or constraint effects.
357
+
358
+ ### UNiagaraDataInterfaceRigidMeshCollisionQuery
359
+ **Header**: `Public/NiagaraDataInterfaceRigidMeshCollisionQuery.h`
360
+
361
+ Provides signed-distance-field (SDF)-based collision queries against rigid body meshes.
362
+
363
+ ---
364
+
365
+ ## Camera DI
366
+
367
+ ### UNiagaraDataInterfaceCamera
368
+ **Header**: `Classes/NiagaraDataInterfaceCamera.h`
369
+ **Sim target**: CPU + GPU (partial)
370
+
371
+ Exposes camera position, rotation, field of view, and depth buffer data to the simulation.
372
+ On GPU, depth buffer sampling is available when a scene depth texture is accessible.
373
+
374
+ ---
375
+
376
+ ## Spline DI
377
+
378
+ ### UNiagaraDataInterfaceSpline
379
+ **Header**: `Classes/NiagaraDataInterfaceSpline.h`
380
+ **Sim target**: CPU
381
+
382
+ Samples positions, tangents, and curvature along a `USplineComponent`. Particles can follow
383
+ or distribute along splines.
384
+
385
+ ---
386
+
387
+ ## Particle Read DI
388
+
389
+ ### UNiagaraDataInterfaceParticleRead
390
+ **Header**: `Classes/NiagaraDataInterfaceParticleRead.h`
391
+ **Sim target**: CPU
392
+
393
+ Allows one emitter to read particle attributes from another emitter within the same system.
394
+ Useful for spawning secondary effects at the positions of particles in a primary emitter.
395
+
396
+ ---
397
+
398
+ ## Data Channel DIs (UE 5.4+)
399
+
400
+ ### UNiagaraDataInterfaceDataChannelRead / Write
401
+ **Headers**: `Internal/DataInterface/NiagaraDataInterfaceDataChannelRead.h` and `...Write.h`
402
+
403
+ Data Channels allow multiple Niagara systems to share data across system boundaries at runtime,
404
+ without direct C++ coupling. Writers push data into a named channel; readers consume it.
405
+
406
+ ---
407
+
408
+ ## Export DI
409
+
410
+ ### UNiagaraDataInterfaceExport
411
+ **Header**: `Classes/NiagaraDataInterfaceExport.h`
412
+ **Sim target**: CPU
413
+
414
+ Allows Niagara to export particle attributes back to C++ via an interface callback. Implement
415
+ `INiagaraParticleCallbackHandler` on your UObject to receive per-particle data:
416
+
417
+ ```cpp
418
+ // Your class must implement INiagaraParticleCallbackHandler.
419
+ #include "NiagaraDataInterfaceExport.h"
420
+
421
+ class UMyParticleCallbackHandler : public UObject, public INiagaraParticleCallbackHandler
422
+ {
423
+ GENERATED_BODY()
424
+ public:
425
+ virtual void ReceiveParticleData(
426
+ const TArray<FBasicParticleData>& Data,
427
+ UNiagaraSystem* NiagaraSystem,
428
+ const FVector& SimulationPositionOffset) override;
429
+ };
430
+ ```
431
+
432
+ ---
433
+
434
+ ## Landscape DI
435
+
436
+ ### UNiagaraDataInterfaceLandscape
437
+ **Header**: `Classes/NiagaraDataInterfaceLandscape.h`
438
+ **Sim target**: CPU
439
+
440
+ Samples height, normal, and material weight data from an `ALandscape` actor.
441
+
442
+ ---
443
+
444
+ ## Occlusion DI
445
+
446
+ ### UNiagaraDataInterfaceOcclusion
447
+ **Header**: `Classes/NiagaraDataInterfaceOcclusion.h`
448
+
449
+ Queries occlusion state from the renderer's occlusion query results.
450
+
451
+ ---
452
+
453
+ ## Actor / Component DI
454
+
455
+ ### UNiagaraDataInterfaceActorComponent
456
+ **Header**: `Internal/DataInterface/NiagaraDataInterfaceActorComponent.h`
457
+
458
+ Exposes an actor's component transforms and velocity to Niagara scripts. Useful for binding
459
+ a target actor's transform without requiring a full skeletal or static mesh DI.
460
+
461
+ ---
462
+
463
+ ## Material / MPC DIs
464
+
465
+ ### NiagaraDataInterfaceMaterialInstanceDynamic
466
+ **Header**: `Private/NiagaraDataInterfaceMaterialInstanceDynamic.h`
467
+
468
+ Allows Niagara to read scalar and vector parameters from a `UMaterialInstanceDynamic`.
469
+
470
+ ### NiagaraDataInterfaceMaterialParameterCollection
471
+ **Header**: `Private/NiagaraDataInterfaceMaterialParameterCollection.h`
472
+
473
+ Reads values from a `UMaterialParameterCollection` asset.
474
+
475
+ ---
476
+
477
+ ## Choosing a DI
478
+
479
+ | Use Case | Recommended DI |
480
+ |---|---|
481
+ | Spawn particles on a character mesh | `UNiagaraDataInterfaceSkeletalMesh` |
482
+ | Scatter particles on a static prop | `UNiagaraDataInterfaceStaticMesh` |
483
+ | Drive emitter rate with an animation curve | `UNiagaraDataInterfaceCurve` |
484
+ | Push a gameplay position list (e.g., AI waypoints) | `UNiagaraDataInterfaceArrayFloat3` (Vector Array) |
485
+ | Particles collide with world geometry | `UNiagaraDataInterfaceCollisionQuery` |
486
+ | Audio-reactive effects | `UNiagaraDataInterfaceAudioSpectrum` |
487
+ | Particles follow a spline path | `UNiagaraDataInterfaceSpline` |
488
+ | Camera-relative VFX (e.g., lens flares) | `UNiagaraDataInterfaceCamera` |
489
+ | Export particle positions to C++ for gameplay | `UNiagaraDataInterfaceExport` |
490
+ | Share data between two independent VFX systems | `UNiagaraDataInterfaceDataChannelRead/Write` |
491
+ | Volumetric / fluid simulation | `UNiagaraDataInterfaceGrid3DCollection` |
@@ -0,0 +1,153 @@
1
+ # Niagara Parameter Types — C++ to Niagara Type Mapping
2
+
3
+ This reference maps Niagara editor parameter types to their C++ setter methods on `UNiagaraComponent`
4
+ and the underlying native C++ types. All parameters must be declared in the `User.` namespace in the
5
+ Niagara editor to be settable from C++ at runtime.
6
+
7
+ Sources: `NiagaraComponent.h`, `NiagaraFunctionLibrary.h`, `NiagaraDataInterfaceArrayFunctionLibrary.h`
8
+ (Engine/Plugins/FX/Niagara/Source/Niagara/).
9
+
10
+ ---
11
+
12
+ ## Scalar Types
13
+
14
+ | Niagara Editor Type | C++ Method (FName variant) | C++ Type | Notes |
15
+ |---|---|---|---|
16
+ | `float` | `SetVariableFloat(FName, float)` | `float` | Default precision |
17
+ | `int32` | `SetVariableInt(FName, int32)` | `int32` | |
18
+ | `bool` | `SetVariableBool(FName, bool)` | `bool` | |
19
+
20
+ ---
21
+
22
+ ## Vector Types
23
+
24
+ | Niagara Editor Type | C++ Method (FName variant) | C++ Type | Notes |
25
+ |---|---|---|---|
26
+ | `Vector2D` | `SetVariableVec2(FName, FVector2D)` | `FVector2D` | |
27
+ | `Vector` / `Vector3` | `SetVariableVec3(FName, FVector)` | `FVector` | |
28
+ | `Position` | `SetVariablePosition(FName, FVector)` | `FVector` | LWC-aware large-world position; use instead of `SetVariableVec3` for world-space positions |
29
+ | `Vector4` | `SetVariableVec4(FName, FVector4)` | `FVector4` | |
30
+ | `Color` (LinearColor) | `SetVariableLinearColor(FName, FLinearColor)` | `FLinearColor` | Do NOT use SetVariableVec3/4 for this |
31
+ | `Quaternion` | `SetVariableQuat(FName, FQuat)` | `FQuat` | Internally converted to `FQuat4f` |
32
+ | `Matrix` | `SetVariableMatrix(FName, FMatrix)` | `FMatrix` | FName variant available; legacy `SetNiagaraVariableMatrix(FString, FMatrix)` also works |
33
+
34
+ ---
35
+
36
+ ## Object / Reference Types
37
+
38
+ | Niagara Editor Type | C++ Method | Argument Type | Notes |
39
+ |---|---|---|---|
40
+ | `Object` (generic UObject) | `SetVariableObject(FName, UObject*)` | `UObject*` | Binds an object reference to a DI user param |
41
+ | `Actor` | `SetVariableActor(FName, AActor*)` | `AActor*` | Convenience wrapper around `SetVariableObject` |
42
+ | `Material` | `SetVariableMaterial(FName, UMaterialInterface*)` | `UMaterialInterface*` | |
43
+ | `Texture` | `SetVariableTexture(FName, UTexture*)` | `UTexture*` | |
44
+ | `TextureRenderTarget` | `SetVariableTextureRenderTarget(FName, UTextureRenderTarget*)` | `UTextureRenderTarget*` | |
45
+
46
+ ---
47
+
48
+ ## Data Interface Types
49
+
50
+ Data interfaces are bound by overriding the User parameter that holds the DI. The parameter appears
51
+ as a DI type in the Niagara editor (e.g., "Skeletal Mesh", "Float Array"). The binding is done via
52
+ `SetVariableObject`, or through the specialized helpers in `UNiagaraFunctionLibrary`.
53
+
54
+ | Niagara DI Type | Binding Method | Notes |
55
+ |---|---|---|
56
+ | Skeletal Mesh DI | `UNiagaraFunctionLibrary::OverrideSystemUserVariableSkeletalMeshComponent` | Pass `USkeletalMeshComponent*` |
57
+ | Static Mesh DI | `UNiagaraFunctionLibrary::OverrideSystemUserVariableStaticMeshComponent` | Pass `UStaticMeshComponent*` |
58
+ | Static Mesh DI (asset) | `UNiagaraFunctionLibrary::OverrideSystemUserVariableStaticMesh` | Pass `UStaticMesh*` directly |
59
+ | Texture DI | `UNiagaraFunctionLibrary::SetTextureObject` | Pass `UTexture*` |
60
+ | 2D Array Texture DI | `UNiagaraFunctionLibrary::SetTexture2DArrayObject` | Pass `UTexture2DArray*` |
61
+ | Volume Texture DI | `UNiagaraFunctionLibrary::SetVolumeTextureObject` | Pass `UVolumeTexture*` |
62
+ | Float Array DI | `UNiagaraDataInterfaceArrayFunctionLibrary::SetNiagaraArrayFloat` | Replaces entire array |
63
+ | Generic DI (typed) | `UNiagaraFunctionLibrary::GetDataInterface<TDIType>` | Returns the DI object for direct mutation |
64
+ | Generic DI (untyped) | `UNiagaraFunctionLibrary::GetDataInterface(UClass*, UNiagaraComponent*, FName)` | Non-template variant |
65
+
66
+ ---
67
+
68
+ ## Array DI Types (UNiagaraDataInterfaceArrayFunctionLibrary)
69
+
70
+ All array setters replace the entire data array in the named User parameter DI.
71
+ Single-element setters exist for in-place updates without replacing the full array.
72
+
73
+ | Array Element Type | Set Whole Array | Set Single Element | Get Whole Array | Get Single Element |
74
+ |---|---|---|---|---|
75
+ | `float` | `SetNiagaraArrayFloat` | `SetNiagaraArrayFloatValue` | `GetNiagaraArrayFloat` | `GetNiagaraArrayFloatValue` |
76
+ | `FVector2D` | `SetNiagaraArrayVector2D` | `SetNiagaraArrayVector2DValue` | `GetNiagaraArrayVector2D` | `GetNiagaraArrayVector2DValue` |
77
+ | `FVector` | `SetNiagaraArrayVector` | `SetNiagaraArrayVectorValue` | `GetNiagaraArrayVector` | `GetNiagaraArrayVectorValue` |
78
+ | `FVector` (Position) | `SetNiagaraArrayPosition` | `SetNiagaraArrayPositionValue` | `GetNiagaraArrayPosition` | `GetNiagaraArrayPositionValue` |
79
+ | `FVector4` | `SetNiagaraArrayVector4` | `SetNiagaraArrayVector4Value` | `GetNiagaraArrayVector4` | `GetNiagaraArrayVector4Value` |
80
+ | `FLinearColor` | `SetNiagaraArrayColor` | `SetNiagaraArrayColorValue` | `GetNiagaraArrayColor` | `GetNiagaraArrayColorValue` |
81
+ | `FQuat` | `SetNiagaraArrayQuat` | `SetNiagaraArrayQuatValue` | `GetNiagaraArrayQuat` | `GetNiagaraArrayQuatValue` |
82
+ | `FMatrix` | `SetNiagaraArrayMatrix` | `SetNiagaraArrayMatrixValue` | `GetNiagaraArrayMatrix` | `GetNiagaraArrayMatrixValue` |
83
+ | `int32` | `SetNiagaraArrayInt32` | `SetNiagaraArrayInt32Value` | `GetNiagaraArrayInt32` | `GetNiagaraArrayInt32Value` |
84
+ | `uint8` | `SetNiagaraArrayUInt8` | `SetNiagaraArrayUInt8Value` | `GetNiagaraArrayUInt8` | `GetNiagaraArrayUInt8Value` |
85
+ | `bool` | `SetNiagaraArrayBool` | `SetNiagaraArrayBoolValue` | `GetNiagaraArrayBool` | `GetNiagaraArrayBoolValue` |
86
+
87
+ `bSizeToFit=true` on single-element setters will grow the array to accommodate the index if needed.
88
+
89
+ **Low-precision internal storage**: Array DIs use internal `FVector3f` / `FVector2f` / `FQuat4f`
90
+ storage (single-precision). The public API accepts double-precision UE types and converts internally.
91
+ For non-BP code using `TConstArrayView<FVector3f>`, use the non-templated C++-only overloads:
92
+
93
+ ```cpp
94
+ // Non-BP overloads accepting single-precision directly (avoids conversion overhead):
95
+ // SetNiagaraArrayFloat(Component, Name, TConstArrayView<double>)
96
+ // SetNiagaraArrayVector(Component, Name, TConstArrayView<FVector3f>)
97
+ // SetNiagaraArrayVector4(Component, Name, TConstArrayView<FVector4f>)
98
+ // SetNiagaraArrayQuat(Component, Name, TConstArrayView<FQuat4f>)
99
+ // SetNiagaraArrayMatrix(Component, Name, TConstArrayView<FMatrix44f>)
100
+ // SetNiagaraArrayUInt8(Component, Name, TConstArrayView<uint8>)
101
+ // SetNiagaraArrayInt32(Component, Name, TConstArrayView<int64>)
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Legacy FString Setters (Blueprint-Oriented, Slower)
107
+
108
+ These exist on `UNiagaraComponent` for Blueprint compatibility. Prefer the `FName` variants above
109
+ in C++ as they avoid a string-to-FName conversion on every call.
110
+
111
+ ```cpp
112
+ // All FString setters — equivalent in behavior, slower in C++.
113
+ SetNiagaraVariableFloat(const FString&, float)
114
+ SetNiagaraVariableInt(const FString&, int32)
115
+ SetNiagaraVariableBool(const FString&, bool)
116
+ SetNiagaraVariableVec2(const FString&, FVector2D)
117
+ SetNiagaraVariableVec3(const FString&, FVector)
118
+ SetNiagaraVariableVec4(const FString&, FVector4)
119
+ SetNiagaraVariableLinearColor(const FString&, FLinearColor)
120
+ SetNiagaraVariableQuat(const FString&, FQuat)
121
+ SetNiagaraVariableMatrix(const FString&, FMatrix) // legacy FString variant; prefer SetVariableMatrix(FName, FMatrix)
122
+ SetNiagaraVariableObject(const FString&, UObject*)
123
+ SetNiagaraVariableActor(const FString&, AActor*)
124
+ SetNiagaraVariablePosition(const FString&, FVector)
125
+ ```
126
+
127
+ ---
128
+
129
+ ## ENCPoolMethod Values
130
+
131
+ Used in `SpawnSystemAtLocation` and `SpawnSystemAttached` `PoolingMethod` parameter.
132
+
133
+ | Value | Behavior |
134
+ |---|---|
135
+ | `ENCPoolMethod::None` | No pooling. Component is destroyed when system finishes if `bAutoDestroy=true`. |
136
+ | `ENCPoolMethod::AutoRelease` | Component returns to the world pool automatically when the system finishes. Never call `DestroyComponent`. |
137
+ | `ENCPoolMethod::ManualRelease` | You must call `ReleaseToPool()` to return the component to the pool. Used for effects that you pause/resume explicitly. |
138
+ | `ENCPoolMethod::FreeInPool` | Internal pool state (not for external use). |
139
+
140
+ ---
141
+
142
+ ## Parameter Namespace Rules
143
+
144
+ Niagara parameters follow a `Namespace.VariableName` convention:
145
+
146
+ - `User.MyParam` — authored as "User Exposed" in Niagara editor; the only namespace settable from C++.
147
+ - `System.Age`, `System.DeltaTime`, `System.ExecutionState` — built-in system parameters; read-only.
148
+ - `Emitter.MyEmitterVar` — scoped to a single emitter; not accessible from C++.
149
+ - `Particle.Position`, `Particle.Velocity` — per-particle; not accessible from C++.
150
+ - `Module.MyModuleVar` — private to a module stack node; not accessible from C++.
151
+
152
+ Always confirm the exact parameter name in the Niagara editor's "Parameters" panel before writing
153
+ C++ code — the name is case-sensitive and the namespace prefix must be included.