unreal-pcg-python — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited unreal-pcg-python (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Python interacts with UE5's Procedural Content Generation (PCG) framework at two levels:
unreal module classes (PCGComponent, PCGBlueprintElement, etc.) for editor automation and custom node logic.Important: All PCG Python functionality is editor-only. Python cannot run in packaged builds or at game runtime.
| Resource | URL |
|---|---|
| PCG Framework Overview | https://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-overview |
| PCG Framework Landing Page | https://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-framework-in-unreal-engine |
| PCG Development Guides | https://dev.epicgames.com/documentation/en-us/unreal-engine/pcg-development-guides |
| PCG Node Reference | https://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-framework-node-reference-in-unreal-engine |
| PCG Data Types Reference | https://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-framework-data-types-reference-in-unreal-engine |
| PCGPythonInterop Plugin API | https://dev.epicgames.com/documentation/en-us/unreal-engine/API/PluginIndex/PCGPythonInterop |
| Python Editor Scripting | https://dev.epicgames.com/documentation/en-us/unreal-engine/scripting-the-unreal-editor-using-python |
| PCGComponent Python API | https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGComponent |
| PCGBlueprintElement Python API | https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGBlueprintElement |
| PCGBlueprintHelpers Python API | https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGBlueprintHelpers |
| PCGSpatialData Python API | https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGSpatialData |
| PCGPointData Python API | https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGPointData |
| Python Interop Roadmap | https://portal.productboard.com/epicgames/1-unreal-engine-public-roadmap/c/2213-python-interop-plugin |
| Resource | URL |
|---|---|
| Forum: Create PCG Graph with Python | https://forums.unrealengine.com/t/create-pcg-graph-with-python/1714891 |
| Forum: Generate PCG through Python | https://forums.unrealengine.com/t/generate-pcg-through-python-script/2053107 |
| Forum: Change PCG Parameters from Python | https://forums.unrealengine.com/t/how-to-change-pcg-graph-parameters-from-python/2060532 |
| Custom PCG Nodes Guide (Blueshift) | https://blueshift-interactive.com/2025/09/03/how-to-create-custom-pcg-nodes/ |
| PCG Extended Toolkit (community C++ plugin) | https://github.com/PCGEx/PCGExtendedToolkit |
| Houdini to PCG Data Example | https://github.com/cgtoolbox/HoudiniToPCGDataExample |
Engine/Plugins/PCGInterops/PCGPythonInterop/IsBetaVersion: true, EnabledByDefault: false)PCGPythonInteropEditor (Editor-only)PCG plugin + PythonScriptPluginThis is the only node the plugin adds. It runs Python code within a PCG graph.
Two input modes:
| Mode | Description |
|---|---|
Input | Reads Python source from an FString attribute on the "Source" pin, or uses an inline default script |
File | Executes a .py file from disk |
Key characteristics:
bMuteEditorToast)print("Hello PCG World!")Settings (UPROPERTY):
ScriptInputMethod -- EPCGPythonScriptInputMethod (Input or File)
ScriptSource -- FPCGAttributePropertyInputSelector (which attribute holds the script)
ScriptPath -- FFilePath (path to .py file, filtered to *.py)
bMuteEditorToast -- bool (suppress editor notification)All properties marked PCG_Overridable (can be set via PCG parameter overrides).
EvaluateStatement mode for line-by-line feedbackThese classes are available via import unreal in any UE Python script, independent of the PCGPythonInterop plugin.
import unreal
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
graph = asset_tools.create_asset(
'MyPCGGraph', '/Game/PCG',
unreal.PCGGraph, unreal.PCGGraphFactory()
)# Get PCGComponent from an actor
pcg_comp = actor.get_component_by_class(unreal.PCGComponent)
pcg_comp.generate(True) # force full regeneration
pcg_comp.generate_local(True) # local only, no replication
pcg_comp.set_graph(my_graph) # swap graph asset
pcg_comp.seed = 42 # set deterministic seed
pcg_comp.cleanup(True, False) # cleanup generated components# PCGSpatialData operations
spatial_data.to_point_data() # convert to points
spatial_data.intersect_with(other) # boolean intersection
spatial_data.union_with(other) # boolean union
spatial_data.subtract(other) # boolean subtraction
spatial_data.get_bounds() # get spatial bounds
spatial_data.get_density_at_position(pos) # sample density
# PCGPointData
point_data = unreal.PCGPointData()
points = point_data.get_points() # -> Array[PCGPoint]
point_data.set_points(modified_points)helpers = unreal.PCGBlueprintHelpers
helpers.get_actor_data(context)
helpers.get_component(context)
helpers.get_random_stream_from_point(point, settings, component)
helpers.compute_seed_from_position(position)
helpers.create_pcg_data_from_actor(actor, parse_actor)PCGBlueprintElement is the base class for custom PCG nodes in Blueprint (and theoretically Python). Available since UE 5.2.
| Method | Purpose |
|---|---|
execute(input) | Primary execution -- receives and returns PCGDataCollection |
execute_with_context(context, input) | Execution with PCG context access |
point_loop_body(context, data, point, metadata, iteration) | Per-point processing |
variable_loop_body(...) | Per-point, returns variable number of output points |
iteration_loop_body(context, iteration, a, b, metadata) | Fixed-count iteration |
node_title_override() | Custom display name |
node_color_override() | Custom node color |
element.custom_input_pins # Array[PCGPinProperties]
element.custom_output_pins # Array[PCGPinProperties]
element.has_default_in_pin # bool
element.has_default_out_pin # bool
element.is_cacheable # bool
element.requires_game_thread # bool| Limitation | Details |
|---|---|
| Editor-only | No Python in packaged builds or runtime. The node explicitly errors: "Editor-only, should not be used at runtime." |
| No programmatic node creation | Python cannot add/connect nodes within a PCG graph programmatically (Epic confirmed, as of 2024) |
| No data output from Execute Python Script | The node only provides execution ordering, not PCG data flow |
| Main thread only | Python execution blocks the main thread |
| API churn | Method names changed between 5.2-5.5 (e.g., loop_on_points -> point_loop) |
| Parameter access is finicky | Setting PCG graph parameters from Python via ParametersOverrides requires navigating complex property bags |
| UE Version | PCG Status | Python Notes |
|---|---|---|
| 5.2 | Experimental | PCGBlueprintElement, PCGComponent Python API introduced |
| 5.3 | Experimental | PCGSpatialData documented, loop API stabilized |
| 5.4 | Beta | PCGBlueprintHelpers fully documented |
| 5.5 | Beta | GPU compute path, PCGGeometryBlueprintElement added |
| 5.7 | Production-Ready | PCGPythonInterop plugin formalized, PCG Editor Mode, ~2x perf |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.