Logo von Unreal Pcg Python

Unreal Pcg Python

Community
maystudios
unreal-pcg-python

Guide for Unreal Engine 5.x PCG (Procedural Content Generation) Python integration. Covers the PCGPythonInterop plugin, the Execute Python Script node, PCG Python API (PCGComponent, PCGBlueprintElement, PCGSpatialData, PCGPointData), editor automation, custom PCG nodes via Python, and known limitations. Use when the user asks about PCG Python, PCGPythonInterop, Execute Python Script node, Python scripting for procedural generation, automating PCG graphs with Python, or creating custom PCG nodes with Python/Blueprint.

Übersicht

Herausgebermaystudios
Repositoryclaude-skills
Skill-Nameunreal-pcg-python
Sterne
30
Forks
3
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von maystudios auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Unreal Pcg Python in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/maystudios/claude-skills/tree/main/unreal-pcg-python
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/maystudios/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/unreal-pcg-python .claude/skills/unreal-pcg-python
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Unreal Pcg Python in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Unreal Pcg Python automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Unreal Pcg Python nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Unreal Engine PCG Python Integration Guide

Overview

Python interacts with UE5's Procedural Content Generation (PCG) framework at two levels:

  1. PCGPythonInterop Plugin (UE 5.5+, Beta) -- An editor-only PCG graph node ("Execute Python Script") that runs Python code mid-graph.
  2. PCG Python API (UE 5.2+) -- Standard 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.

Official Documentation

ResourceURL
PCG Framework Overviewhttps://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-overview
PCG Framework Landing Pagehttps://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-framework-in-unreal-engine
PCG Development Guideshttps://dev.epicgames.com/documentation/en-us/unreal-engine/pcg-development-guides
PCG Node Referencehttps://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-framework-node-reference-in-unreal-engine
PCG Data Types Referencehttps://dev.epicgames.com/documentation/en-us/unreal-engine/procedural-content-generation-framework-data-types-reference-in-unreal-engine
PCGPythonInterop Plugin APIhttps://dev.epicgames.com/documentation/en-us/unreal-engine/API/PluginIndex/PCGPythonInterop
Python Editor Scriptinghttps://dev.epicgames.com/documentation/en-us/unreal-engine/scripting-the-unreal-editor-using-python
PCGComponent Python APIhttps://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGComponent
PCGBlueprintElement Python APIhttps://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGBlueprintElement
PCGBlueprintHelpers Python APIhttps://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGBlueprintHelpers
PCGSpatialData Python APIhttps://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGSpatialData
PCGPointData Python APIhttps://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGPointData
Python Interop Roadmaphttps://portal.productboard.com/epicgames/1-unreal-engine-public-roadmap/c/2213-python-interop-plugin

Community Resources


1. PCGPythonInterop Plugin ("Execute Python Script" Node)

Plugin Details

  • Location: Engine/Plugins/PCGInterops/PCGPythonInterop/
  • Status: Beta (IsBetaVersion: true, EnabledByDefault: false)
  • Module: PCGPythonInteropEditor (Editor-only)
  • Dependencies: PCG plugin + PythonScriptPlugin

Enabling the Plugin

  1. Enable Python Editor Script Plugin (under Plugins > Scripting)
  2. Enable PCG Python Interop (under Plugins > Procedural Content Generation)
  3. Restart the editor

The "Execute Python Script" Node

This is the only node the plugin adds. It runs Python code within a PCG graph.

Two input modes:

ModeDescription
InputReads Python source from an FString attribute on the "Source" pin, or uses an inline default script
FileExecutes a .py file from disk

Key characteristics:

  • Runs on main thread only (Python GIL constraint)
  • Not cacheable -- re-executes every time the graph runs
  • No data output -- output pin is dependency-only (for execution ordering)
  • Shows an editor toast on execution (suppressible via bMuteEditorToast)
  • Default inline script: 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).

Planned Future Features (from source TODOs)

  • EvaluateStatement mode for line-by-line feedback
  • Parameter inputs/outputs (get/set variables from within Python, like Blueprint/HLSL nodes)
  • Generalized source editor in PCG for HLSL + Python
  • Potential multi-thread support

2. PCG Python API (Editor Automation)

These classes are available via import unreal in any UE Python script, independent of the PCGPythonInterop plugin.

Create PCG Graph Assets

python
import unreal

asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
graph = asset_tools.create_asset(
    'MyPCGGraph', '/Game/PCG',
    unreal.PCGGraph, unreal.PCGGraphFactory()
)

Trigger PCG Generation

python
# 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

Work with Spatial Data

python
# 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)

PCGBlueprintHelpers (Utility Functions)

python
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)

3. Custom PCG Nodes via PCGBlueprintElement

PCGBlueprintElement is the base class for custom PCG nodes in Blueprint (and theoretically Python). Available since UE 5.2.

Key Overridable Methods

MethodPurpose
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

Configurable Properties

python
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

4. Known Limitations

LimitationDetails
Editor-onlyNo Python in packaged builds or runtime. The node explicitly errors: "Editor-only, should not be used at runtime."
No programmatic node creationPython cannot add/connect nodes within a PCG graph programmatically (Epic confirmed, as of 2024)
No data output from Execute Python ScriptThe node only provides execution ordering, not PCG data flow
Main thread onlyPython execution blocks the main thread
API churnMethod names changed between 5.2-5.5 (e.g., loop_on_points -> point_loop)
Parameter access is finickySetting PCG graph parameters from Python via ParametersOverrides requires navigating complex property bags

5. Version History

UE VersionPCG StatusPython Notes
5.2ExperimentalPCGBlueprintElement, PCGComponent Python API introduced
5.3ExperimentalPCGSpatialData documented, loop API stabilized
5.4BetaPCGBlueprintHelpers fully documented
5.5BetaGPU compute path, PCGGeometryBlueprintElement added
5.7Production-ReadyPCGPythonInterop plugin formalized, PCG Editor Mode, ~2x perf

6. Best Practices

  • Use Python for automation: Batch asset creation, parameter sweeps, CI/CD pipelines
  • Use Blueprint for custom nodes: More stable API, designer-friendly, works in editor
  • Use C++ for performance: Multi-threaded, GPU HLSL support, full API access
  • Python + PCG sweet spot: Triggering generation across many actors, managing seeds, integrating external data (Houdini, numpy), asset migration scripts

Häufig gestellte Fragen

Was macht der KI-Skill Unreal Pcg Python?

Guide for Unreal Engine 5.x PCG (Procedural Content Generation) Python integration. Covers the PCGPythonInterop plugin, the Execute Python Script node, PCG Python API (PCGComponent, PCGBlueprintElement, PCGSpatialData, PCGPointData), editor automation, custom PCG nodes via Python, and known limitations. Use when the user asks about PCG Python, PCGPythonInterop, Execute Python Script node, Python scripting for procedural generation, automating PCG graphs with Python, or creating custom PCG nodes with Python/Blueprint.

Warum Unreal Pcg Python in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Unreal Pcg Python besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Unreal Pcg Python in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/maystudios/claude-skills/tree/main/unreal-pcg-python ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Unreal Pcg Python nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Unreal Pcg Python verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Unreal Pcg Python damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Unreal Pcg Python kostenlos?

Ja. Der Skill wird von maystudios auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇