ue-actor-component-arc…
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when generating world content or geometry procedurally in Unreal Engine: PCG graphs, custom PCG nodes in C++, runtime mesh building, instancing and seeded noise. Also use when the user mentions 'PCG', 'UPCGComponent', 'UPCGSettings', 'IPCGElement', 'UPCGBasePointData',
Claude Code
$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation --agent claude-code
Codex
$ npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a codex -y
Cursor
$ npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a cursor -y
Gemini CLI
$ npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a gemini-cli -y
GitHub Copilot
$ npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a github-copilot -y
OpenCode
$ npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a opencode -y
Windsurf
$ npx skills add quodsoler/unreal-engine-skills --skill ue-procedural-generation -a windsurf -y
name: ue-procedural-generation description: "Use when generating world content or geometry procedurally in Unreal Engine: PCG graphs, custom PCG nodes in C++, runtime mesh building, instancing and seeded noise. Also use when the user mentions 'PCG', 'UPCGComponent', 'UPCGSettings', 'IPCGElement', 'UPCGBasePointData', 'surface sampler', 'static mesh spawner', 'runtime generation', 'CreateMeshSection', 'UProceduralMeshComponent', 'UDynamicMeshComponent', 'Geometry Script', 'AddInstance', 'HISM', 'spline mesh', 'PerlinNoise', 'FRandomStream', 'scatter foliage' or 'marching cubes'. For collision on generated geometry, see ue-physics-collision; for instance materials, see ue-materials-rendering; for background work, see ue-async-threading." metadata: version: "2.0.0" engine: "5.8"
Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".
Covers the PCG framework (plugin `PCG` at `Engine/Plugins/PCG`, enabled by default, Build.cs module `PCG`), runtime mesh building with `UProceduralMeshComponent` (plugin `ProceduralMeshComponent`, module `ProceduralMeshComponent`) and `UDynamicMeshComponent` + Geometry Script (modules `GeometryFramework` and `GeometryScriptingCore`), instancing with `UInstancedStaticMeshComponent`/`UHierarchicalInstancedStaticMeshComponent`, spline-driven placement, and deterministic noise/random from `Core`.
Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.
Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.
| Request is about… | Go to | |---|---| | Enabling PCG, module/plugin wiring | [PCG setup](#pcg-setup) | | Driving generation from an actor, runtime generation, partitioning | [PCG component and runtime generation](#pcg-component-and-runtime-generation) | | Reading/writing points inside a graph | [Point data](#point-data) | | Writing a new PCG node in C++ | [Custom PCG node in C++](#custom-pcg-node-in-c) | | Which node does X, pin labels, node settings fields | [PCG node reference](references/pcg-node-reference.md) | | Building triangles at runtime | [ProceduralMeshComponent](#proceduralmeshcomponent) | | Boolean ops, primitives, baking to a static mesh | [Dynamic Mesh and Geometry Script](#dynamic-mesh-and-geometry-script) | | Thousands of repeated meshes | [Instanced static meshes](#instanced-static-meshes) | | Roads, rivers, fences, cables | [Splines](#splines) | | Heightfields, scatter, reproducible results | [Noise and deterministic random](#noise-and-deterministic-random) | | Marching cubes, BSP dungeons, WFC, Poisson disc | [Procedural mesh patterns](references/procedural-mesh-patterns.md) |
// MyGame.Build.cs
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "PCG" });{ "Name": "PCG", "Enabled": true }| Class | Header | Role | |---|---|---| | `UPCGComponent` | `PCGComponent.h` | Actor component that owns a graph and drives generation | | `UPCGGraph` | `PCGGraph.h` | Graph asset: nodes, edges, `UserParameters` | | `UPCGGraphInstance` | `PCGGraph.h` | Graph instance with per-instance parameter overrides | | `UPCGGraphInterface` | `PCGGraph.h` | Common base of graph and graph instance | | `UPCGSettings` | `PCGSettings.h` | Node settings base class | | `IPCGElement` | `PCGElement.h` | The executable half of a node | | `FPCGContext` | `PCGContext.h` | Per-execution state: `InputData`, `OutputData`, `Node`, `ExecutionSource` | | `UPCGBasePointData` | `Data/PCGBasePointData.h` | Abstract point collection | | `UPCGPointArrayData` | `Data/PCGPointArrayData.h` | Structure-of-arrays point data | | `UPCGSubsystem` | `Subsystems/PCGSubsystem.h` | Scheduling, partitioning, runtime generation | | `APCGVolume` | `PCGVolume.h` | Volume actor carrying a `UPCGComponent` |
#include "PCGComponent.h"
#include "PCGGraph.h"
void AMyGenerator::StartGeneration(UPCGGraphInterface* Graph, int32 InSeed)
{
UPCGComponent* PCG = FindComponentByClass<UPCGComponent>();
if (!PCG)
{
return;
}
PCG->Seed = InSeed;
PCG->bActivated = true;
PCG->SetGraph(Graph); // NetMulticast, Reliable
PCG->Generate(/*bForce=*/true); // NetMulticast, Reliable
}| Call | Replication | Use for | |---|---|---| | `Generate(bool bForce)` / `Cleanup(bool bRemoveComponents)` | `NetMulticast, Reliable` | Server-driven generation that must appear on clients | | `GenerateLocal(bool bForce)` / `CleanupLocal(bool bRemoveComponents)` | none | Client-side or single-player generation | | `NotifyPropertiesChangedFromBlueprint()` | none | Mark dirty and conditionally regenerate after editing exposed properties | | `CancelGeneration()` | none | Abort an in-flight generation | | `GetGeneratedGraphOutput()` | none | Read back the `FPCGDataCollection` the graph produced |
`EPCGComponentGenerationTrigger` (`PCGComponent.h:77`): `GenerateOnLoad`, `GenerateOnDemand`, `GenerateAtRuntime`.
Partitioning and runtime generation:
A collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing Unreal Engine C++ AI — AI controllers, behavior tree nodes, blackboards, AI perception, navmesh pathfinding, EQS…
Use when writing or debugging Unreal Engine animation C++: AnimInstance subclasses, thread-safe update, FAnimInstanceProxy,…
Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers…
Use when playing, mixing or debugging sound in Unreal Engine — one-shot SFX, looping ambience, music, dialogue or procedural…
Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure,…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…