Getting Started
Get CodeScape running in your Unreal Engine project in under 5 minutes.
Installation
Download the plugin
Download CodeScape from the downloads page or the Epic Games FAB Marketplace. You'll receive a .zip file containing the plugin.
Copy to your project
Extract the archive and copy the CodeScape folder into your project's Plugins/ directory.
YourProject/
Plugins/
CodeScape/
CodeScape.uplugin
Source/
Resources/
Enable the plugin
Open your project in Unreal Engine 5.7+, go to Edit → Plugins, search for "CodeScape" and enable it. Restart the editor when prompted.
Configure your AI provider
Open Edit → Editor Preferences → Plugins → CodeScape → API Keys and enter your API key for at least one provider. Keys are stored locally per-user and never committed to version control. Or use Ollama for free local inference.
Your First Tool
Once installed, open any Blueprint editor and look for the CodeScape chat panel docked on the right side. Type a natural language command:
you > Create a health component with max health 100, take damage function, and death event
CodeScape will analyze your request, select the appropriate tools (CreateBlueprint, AddVariable, CompileDSL), and generate a complete Blueprint with variables, functions, and event dispatchers, all with proper node layout.
Session Modes
- Floating panel: Access from the CodeScape toolbar button in any editor window
- Docked panel: Automatically embedded in Blueprint, Material, Widget, AnimBP, and BehaviorTree editors
- MCP client: Use Claude Desktop, Cursor, or any MCP-compatible tool to access CodeScape remotely
Prompting Guide
A vague prompt produces vague results. CodeScape rewards specific, structured asks. Five minutes here saves you hours of trial and error.
6 rules that work
1. Break complex tasks into numbered passes
One big request becomes a wall of text. The AI either skips steps or stops mid-way. Split the work into PASS 1, PASS 2, PASS 3 with one sub-goal per pass and an "Announce each pass before its tool calls" closing line.
Build a corridor.
PASS 1: floor 4000x400x20 cm.
PASS 2: two parallel walls 4000x20x600.
PASS 3: 4 PointLights every 1000 cm.
Announce each pass before tools.2. Always express dimensions in centimeters via size:
Unreal world units are centimeters. CodeScape's spawn_actors tool exposes a size parameter that takes target dimensions directly in cm and computes the scale internally. Use it.
// Good
spawn_actors actor_class "Cube", size {x:3000, y:1600, z:1500}
// Wrong (legacy multiplier interpretation)
spawn_actors actor_class "Cube", scale {x:3000, y:1600, z:1500}
// = 30000 cm cube. 100x too big.3. Name the tools when the intent is clear
Generic asks ("create a level") let the AI improvise. Naming the tool guides it toward the right call without you needing to specify every parameter.
// Vague
"Make a medieval town"
// Clear
"Use generate_structure type 'town' style 'medieval' size {grid_size:5, block_spacing:1500}"4. State scale, style, and budget
An "ancient temple" can be 5x5 m or 50x50 m. Always specify the rough size in cm, the style (modern, medieval, sci-fi), and an actor budget if you care about performance.
"Build a small medieval temple, ~2000x2000 cm footprint, max 30 actors. Use generate_structure where applicable."5. End multi-step prompts with an explicit organize step
Your Outliner becomes a mess otherwise. Tell CodeScape to put everything into a named folder.
"...Final pass: organize_outliner folder 'TempleScene', actor_labels of every spawned actor."6. When you want it walkable, say "walkable" and demand gaps
Without explicit instruction, the AI may overlay a door cube on a solid wall (which is not walkable). State the requirement.
"Build a walkable house. Doors and windows must be GAPS in the wall (split walls into segments), never cubes overlaid on solid walls."Common pitfalls and how to avoid them
PCG presets do not spawn content by themselves
create_pcg_preset creates an asset (a template) in the Content Browser. To get the actual procedural content visible in the level, you must follow with spawn_pcg_in_level.
// Wrong: empty level after this
create_pcg_preset preset "city_district" name "PCG_Town"
// Right: town visible after this
create_pcg_preset preset "city_district" name "PCG_Town"
spawn_pcg_in_level pcg_asset "/Game/.../PCG_Town" location {0,0,0}For one-shot scenes, prefer generate_structure type "town" which spawns directly without the two-step PCG dance.
generate_structure uses block counts, not centimeters
This is the #1 cause of editor freezes. The tool's size object expects integer block counts. The default block_size is 100 cm, so width: 8 means an 800 cm wide structure.
// Wrong (would loop 800x600x350 = 168 million iterations, freeze guaranteed)
generate_structure type "house", size {width:800, depth:600, height:350}
// Right (8x6x3 blocks of 100 cm = 800x600x300 cm house)
generate_structure type "house", size {width:8, depth:6, height:3, floors:2}CodeScape now refuses any int dimension above 30 with a clear error, but you should still write the right values.
ExponentialHeightFog is its own tool, not a volume type
manage_volumes handles BlockingVolume, TriggerVolume, KillZ, PainCausing, Physics, Audio, etc. ExponentialHeightFog has a dedicated tool because it is not a volume in the technical sense.
// Wrong
manage_volumes action "spawn", volume_type "ExponentialHeightFog"
// Right
manage_exponential_height_fog action "spawn", fog_density 0.04, inscattering_color {r:1, g:0.6, b:0.2}Parameter names are exact, not generic
The most common retry-causing mistakes when writing prompts manually:
create_level_sequencewantsname+path, notsequence_path.add_camera_cut_trackwants acutsarray of{camera_label, start_time, end_time}, not flat fields.edit_actor_propertywantsproperty_valueas a string, notvalue.organize_outlinerwantsfolder, notfolder_path.generate_structurewantstype, notstructure_type.
If you are unsure, just write the intent in plain English and let the AI pick the schema. The AUTO-SERVED tool details in the system prompt will steer it toward the right names.
"Plane" is not a valid actor class
Use a thin Cube for a flat ground: spawn_actors Cube, size {10000, 10000, 20}.
Budget your actor count per request
If a single prompt would spawn more than ~50 actors, split it into multiple requests, OR use generate_structure / PCG, OR call manage_mesh_merging at the end to bake the result into one merged static mesh (huge perf win).
Patterns: do vs don't
Don't: vague one-liner
> Build a cool dungeonThe AI improvises. You get whatever it imagines, often unaligned with your goal.
Do: scoped, structured, named tools
> Build a 1500x1500 cm dungeon room.
PASS 1: floor 1500x1500x20 cm + 4 walls 1500x20x300 cm forming a square.
PASS 2: in the south wall, replace the central 200x300 segment with two segments leaving a door gap.
PASS 3: spawn 4 torch PointLights at the corners, intensity 3000, warm color RGB(255,150,50).
PASS 4: spawn a fire Niagara on each torch.
PASS 5: organize_outliner folder "Dungeon".
Announce each pass.Predictable, reproducible, debuggable.
Don't: ask for too many subsystems at once without scoping
> Make a survival gameThis is a project, not a prompt. The AI will pick something arbitrary.
Do: prompt one subsystem at a time
> Create a Health component (BPC_Health) with MaxHP 100, ApplyDamage(float) function, and OnDeath event dispatcher. Compile when done.Then in the next prompt: hunger system. Then inventory. Then UI. Each is a clean, testable unit.
Templates and Rule Packs: prompting on autopilot
Templates Library
The ✦ Templates button opens a library of 13 curated multi-pass prompts that already follow every rule above. Categories: Environment (church, village, sci-fi corridor, walkable room, two-story house, modular pack builder), Gameplay (health system, inventory UI), VFX (explosion, magic portal), Blueprint (door with key, pickupable item), Cinematic (hero reveal shot). Click any entry, send, watch it work.
You can add your own templates by editing Saved/CodeScape/user_templates.json using the same schema as the bundled defaults.
Rule Packs
Open Global AI Rules and you'll find 7 stackable presets. Toggle them per project to pin behavior across every prompt:
- Strict Greybox: no materials, only /Engine/BasicShapes, size in cm.
- Rapid Prototype: speed first, skip naming polish.
- Production Quality: enforces UE5 naming, outliner folders, compile checks.
- Multiplayer-Ready: Replicated variables, Server RPCs, authority guards.
- C++ First: prefer C++ over Blueprints.
- Modular Architecture: forces wall panels and gaps for walkable buildings.
- Plan First (Safety Net): AI announces a plan and waits for "go" before executing.
Prompt Reformulator
Type your draft in any tone or language, hit the 🪄 button (or Ctrl+Shift+R), and CodeScape rewrites it into the optimal structure: numbered passes, size: in cm, tool names spelled out, anti-pattern callouts. Press the button again to undo.
Modular asset packs (Fab / Kitbash / Megascans)
Working with imported modular packs (walls, columns, kitbash bundles) has a specific failure mode that catches every level designer the first time. Here is what happens and how CodeScape handles it.
Why imported packs misbehave
Many marketplace packs (Fab, Kitbash3D, ArtStation bundles, Megascans collections) ship as FBX files exported with the world transforms baked in. The mesh's pivot stays at world origin (0, 0, 0), but the actual geometry sits hundreds of centimeters away on X and Y. When you spawn one of these meshes in Unreal, the engine places the pivot at your target location, but the visible mesh appears wherever its baked offset puts it.
Concretely, you ask for a wall at (1000, 0, 0), CodeScape spawns it correctly via spawn_actors, and the wall ends up at (200, -800, 0) because the pack's pivot-to-geometry offset was (-800, 800, 0). Multiply that across 30 walls in a fort and the result looks like a pile of cubes thrown at the level, not a structure.
This is not a CodeScape bug. It is the pack. But CodeScape now compensates for it automatically when you ask.
The anchor parameter on spawn_actors
Every actor passed to spawn_actors accepts an anchor field that controls how its world bounding box is aligned with location:
"pivot"(default): raw mesh pivot atlocation.xyz, zero offset. Backwards compatible. Use only when you know the pivot is meaningful (e.g. a Blueprint with a gameplay socket)."center": bounding box center aligned withlocation.xyz. Robust against broken pivots in any axis."bottom": bbox bottom Z atlocation.z, bbox center on X/Y. The right choice for walls, pillars, columns, anything sitting on the ground."top": bbox top Z atlocation.z, bbox center on X/Y. For ceiling slabs hanging from a known top edge.
Rule of thumb: any mesh under /Game/<something_you_did_not_author>/* should be spawned with anchor: "bottom". The default "pivot" stays in place to avoid breaking existing call sites and Blueprints with intentional pivots.
{"tool_name":"spawn_actors","arguments":{"actors":[
{"static_mesh_path":"/Game/Kitbash_Castle/Walls/SM_Wall_Stone_01",
"location":{"x":1000,"y":0,"z":0},
"rotation":{"yaw":0},
"anchor":"bottom",
"label":"Castle_WallN_01"}
]}}Recommended workflow
- Validate the pack first. Open Templates, run Modular Pack Builder (Fab / Kitbash). Paste your pack's content path when asked. The template builds a 12 m × 12 m sample fort using the most wall-shaped mesh in the pack, with
anchor: "bottom"on every actor. - Walk through the door on the south side. If the walls align cleanly side-by-side and stand on the ground, the pack is good.
- If walls float, overlap, or look offset: the pack has additional pivot quirks (rotation baked in, scale baked in, or per-mesh offsets that vary by panel). Generate a bug report from inside the same chat. We will look at the pack-specific signature and add another fix.
- Once validated, ask CodeScape to build a bigger structure. Always remind it to use
anchor: "bottom"on imported packs. It is in the system prompt, but a one-line reminder in your message is cheap insurance.
Prompt skeleton you can adapt
If you skip the template and prompt by hand, this skeleton works for any modular pack. Replace the path and the dimensions, keep the structure.
Build a 1500x1500 cm walled courtyard using meshes from
/Game/<your_pack>/<subfolder>.
PHASE 1: Discover
- list_assets_in_folder, filter StaticMesh.
- get_mesh_info on 2 wall-looking meshes.
- Tell me the panel width you'll use.
PHASE 2: Build
- spawn_actors in batches of 4-6 actors max.
- EVERY actor: anchor "bottom".
- Walls panel-by-panel along each side, spaced by panel width.
- Skip one center panel on the south wall for the door.
PHASE 3: Organize into folder "MyCourtyard".
Announce each phase. If a tool call fails, retry just that one.Tool Reference
Browse all 329 tools organized by category. Use the search bar to find specific tools.
Blueprints 34 tools
Create, edit, compile and analyze Blueprint graphs with AI-driven node generation and auto-layout.
Materials 8 tools
Generate PBR materials, master materials, material instances and complex shader graphs.
Level Design 22 tools
Spawn actors, configure lighting, organize outliners, audit performance and manipulate terrain.
Sequencer & Cinematics 14 tools
Create level sequences, camera rigs, tracks, keyframes and cinematic shot presets.
Niagara VFX 5+ tools
Create particle systems with presets for fire, smoke, rain, magic and custom emitters.
Animation 10+ tools
Build state machines, blend spaces, montages, motion matching and IK systems.
Audio & MetaSounds 14 tools
Place ambient sounds, configure spatial audio, sound mixes, and procedural MetaSound patches.
AI & Gameplay 26+ tools
Behavior trees, AI perception, NavMesh, EQS, Gameplay Abilities, Enhanced Input, State Trees, Smart Objects.
World Building & PCG 22+ tools
Procedural structures, PCG graphs, geometry scripting, landscape sculpting, water systems, foliage.
Physics & Chaos 8 tools
Rigid bodies, constraints, Chaos destruction, vehicle setup, cloth simulation.
Rendering & Graphics 15 tools
Configure Lumen GI, Nanite, Virtual Shadow Maps, TSR, Ray Tracing, Pixel Streaming.
Asset Management & Infrastructure 29+ tools
Find, rename, validate, audit assets. Data structures, editor utilities, Mass Entity configuration.
AI Providers
CodeScape supports 11 preconfigured AI providers (10 cloud + Ollama local) plus a custom endpoint for any OpenAI-compatible API: OpenRouter, Together, Fireworks, vLLM, LM Studio, internal company gateways, or any future LLM with an OpenAI-spec endpoint. Configure one or more in Editor Preferences → Plugins → CodeScape → API Keys.
Choosing a provider for your task
CodeScape is provider-agnostic by design: every supported model can drive every one of the 329 tools in the registry. The plugin formats prompts, parses tool calls, and renders results identically regardless of which model is talking. What changes between providers is the model itself. Its ability to follow the tool schema, validate before acting, and avoid hallucinating API names.
This distinction matters because when a generation fails it is tempting to blame "CodeScape", but in most cases the plugin correctly forwarded the model's request to the engine and the engine correctly rejected it because the model invented something that does not exist.
Pick by task complexity
Single-tool calls, small edits → Any provider, including small/fast tiers
Level dressing, single-BP variable add → Mid-tier (Gemini 2.5 Flash, Grok-3-mini, GLM)
Full Blueprint with event chains → Top-tier (Claude Sonnet 4+, GPT-5, Gemini 2.5 Pro)
Multi-asset gamemode (BPs + Widgets) → Top-tier, no exceptionsHow to tell whether a failure is the plugin or the provider
Every CodeScape session writes a structured bug report to Saved/CodeScape/Reports/Bugs/report_<timestamp>_<id>/ (use the bug-reporter button in the chat). Open activity_log.jsonl, search for "success":false, and look at the arguments object next to the error string. The failure is almost always one of two cases:
1. The plugin's tool rejected an invalid request (provider issue)
Real examples we have seen in user reports, every one verifiable by hand in the editor:
edit_component_property sent component_name="PlayerInput" → Component not found (it does not exist on Character)
edit_component_property sent component_name="CharMoveComp" → Component not found (real name is CharacterMovement)
edit_blueprint_node sent node_id="K2Node_CallFunction_0" → Source node not found (id was guessed, never created)
edit_blueprint_node tried to wire then(Exec) to self(Object) → Pins are incompatible
manage_blueprint_graph event_override of SetupPlayerInputComponent → Function not found in parent class
configure_world_settings sent action="set_game_mode" → Unknown action (real action is "set" with game_mode param)In every row above the tool did exactly what it should have done. The model hallucinated a component name, a node id, an action name, or tried to wire pins of incompatible types. No plugin change can prevent a model from inventing input it never validated. Defenses CodeScape adds (did_you_mean suggestions, available_functions echoed in errors, Use force=true hints) help good models recover. They do not help models that ignore error responses.
2. The plugin's tool itself misbehaved (plugin issue)
These look different. The arguments are objectively correct, the error mentions internals (LogBlueprint Warning, an ensureMsgf trip, a stack trace pointing inside CodeScape's own modules), and the same call works on a different model. When in doubt, file a bug report through the chat. It captures everything we need to reproduce.
Field notes per provider family
These are observations, not benchmarks. Mileage varies by task, prompt quality, and model release version.
- Top-tier (Claude Sonnet 4+, GPT-5, Gemini 2.5 Pro). Reliable on multi-step Blueprint generation. Reads
validate_blueprint_graphresults before acting on them, reads error replies and adjusts the next call, honoursUse force=truehints. For complete gamemodes (multiple BPs + Widget UI + Input setup + level wiring) we have only seen reliable end-to-end results from this tier. - Mid-tier (Gemini 2.5 Flash, Grok-3-mini, GLM-4.6, Mistral Large). Reliable on single-tool tasks and on level-dressing recipes that are sequences of independent calls. They lose track when the BP graph starts to depend on its own previous state, so re-run individual phases rather than asking for the whole thing in one shot.
- Small / cheap tiers (MiniMax-M2.x, GPT-4o-mini, GLM small, etc.). This is where the provider/plugin split becomes most visible. We have a verified user session report (
Reports/Bugs/report_2026-04-29_11-30-45_A286395F, MiniMax-M2.7 asked to assemble a complete Postman gamemode) with these headline numbers:- 385 total tool calls, 326 succeeded (84.7% success rate)
- 12 distinct error signatures, every single one traceable to the failure pattern shown in the table above
edit_blueprint_nodewas called 7 times and failed 6 of them. Every failure was anode_idthe model invented instead of looking up viasearch_nodesfirstdelete_assetcalls withoutforce=truedespite the engine returning the hint four times
- Local (Ollama, llama.cpp). 7B/8B models drop tool-call formatting frequently. 32B+ instruct-tuned models are usable for single-tool tasks. For sustained Blueprint generation, expect the same hallucination pattern as small-tier cloud models unless you are running a top-tier model locally (Llama-3.1-405B, Qwen 2.5 Coder 32B+).
What to do when a generation goes off the rails
- Stop early. If you see repeated identical errors in the chat (the model retrying the same invented call), interrupt and rephrase. Models that fail to learn from their own error replies will keep failing on that same step.
- Switch providers for that one task. The plugin lets you switch providers from the chat header without losing the conversation history. Send the same prompt to a top-tier model and compare.
- Break the task down. Multi-asset gamemodes work best when each phase (create assets → wire variables → wire events → final compile) is a separate prompt. This holds even for top-tier models.
- File a bug report if and only if the failure is clearly inside the plugin (case 2 above). Provider hallucinations are a model-vendor problem; no plugin patch fixes them.
Google Gemini
Gemini offers excellent multi-modal capabilities with image understanding. A free tier is available for experimentation.
Provider: Gemini
API Key: Your Google AI Studio key
Model: gemini-2.5-flash (recommended) or gemini-2.5-pro
Vision: SupportedOpenAI
The industry-standard large language model with broad knowledge of game development patterns.
Provider: OpenAI
API Key: Your OpenAI API key
Model: gpt-4.1-mini (recommended), gpt-4o, or o4-mini
Vision: SupportedAnthropic Claude
Claude excels at complex reasoning and understanding nuanced instructions. Large context window for complex projects.
Provider: Claude
API Key: Your Anthropic API key
Model: claude-haiku-4-5 (recommended), claude-sonnet-4-6, or claude-opus-4-6
Vision: SupportedDeepSeek
High-performance open model with excellent code generation capabilities at competitive pricing.
Provider: DeepSeek
API Key: Your DeepSeek API key
Model: deepseek-chat or deepseek-reasoner
Vision: Not supportedMiniMax
Specialized generation model for creative and structured content tasks.
Provider: MiniMax
API Key: Your MiniMax API key
Model: MiniMax-M2.7 (recommended)
Vision: Not supportedGroq
Ultra-fast inference on open-source models (Llama, Qwen). Ideal when response latency matters.
Provider: Groq
API Key: Your Groq API key
Model: llama-3.3-70b-versatile (recommended), llama-3.1-8b-instant, or qwen/qwen-3-32b
Vision: Not supportedMistral AI
European LLM provider with strong multilingual support and the Codestral model tuned for code.
Provider: Mistral
API Key: Your Mistral API key
Model: mistral-medium-latest (recommended), mistral-large-latest, or codestral-latest
Vision: Limitedmistral-small-latest with CodeScape, its 32K context window is too tight for the system prompt plus tool details. Pick mistral-medium-latest or larger.
Cohere
Enterprise-grade LLM with a strong focus on retrieval-augmented generation and command-style models.
Provider: Cohere
API Key: Your Cohere API key
Model: command-a-03-2025 (recommended) or command-a-reasoning-08-2025
Vision: Not supportedxAI Grok
xAI's Grok family, reasoning-first models with long context and tool use.
Provider: Grok
API Key: Your xAI API key
Model: grok-4 (recommended), grok-4.1-fast, or grok-3-mini
Vision: SupportedZhipu GLM (z.ai)
Zhipu's GLM family via z.ai. OpenAI-compatible endpoint with strong coding performance and competitive pricing. The Coding Plan offers a flat $18/month rate for heavy coding workloads.
Provider: GLM
API Key: Your z.ai API key
Model: glm-5.1 (recommended), glm-5v-turbo, glm-4-plus, glm-4-air, glm-z1-air
Endpoint (Standard, pay-per-token): https://api.z.ai/api/paas/v4/chat/completions
Endpoint (Coding Plan, $18/mo flat): https://api.z.ai/api/coding/paas/v4/chat/completions
Vision: Supported (glm-5v-turbo)Ollama (Local)
Run AI models completely locally on your machine. No API key needed, no internet required. Full privacy for sensitive projects.
Provider: Ollama
Endpoint: http://localhost:11434 (default)
Model: llama3.1, codellama, mistral, or any Ollama model
Cost: Freeollama.ai, then run ollama pull llama3.1 to download a model. CodeScape will detect it automatically.
What's New in v2.1
Quality-of-life features added to make prompting easier for beginners and more reliable for everyone.
Templates Library
A new ✦ Templates button in the chat action bar opens a curated library of multi-pass prompt recipes. Click an entry to inject a fully-structured prompt into your input, ready to send.
v2.1 ships with 10 templates across 5 categories:
- Environment: Gothic Church Greybox, Medieval Village Square, Sci-Fi Corridor
- Gameplay: Health & Damage System, Inventory UI Widget
- VFX: Explosion (Niagara), Magic Portal
- Blueprint: Door With Key, Pickupable Item
- Cinematic: Hero Reveal Shot
Every shipped template uses the new size: parameter (in cm) and names tools explicitly, so the AI cannot fall into the "100x too big" scale trap. You can add your own templates in Saved/CodeScape/user_templates.json using the same schema as the bundled defaults.
Rule Packs
Open Global AI Rules and you'll find a new section above your custom instructions: a list of toggleable presets that stack with your own rules. Each pack is capped at ~500 characters (~125 tokens) so you can combine three or four without burning your context window.
v2.1 ships with 6 rule packs:
- Strict Greybox: forbids materials, forces
size-in-cm, only/Engine/BasicShapes. Use for level design experiments. - Rapid Prototype: cuts corners on naming and polish, collapses multi-actor calls into bulk
spawn_actors. - Production Quality: enforces UE5 naming (
BP_,M_,WBP_, etc.), variable categories, outliner folders, compile-after-edit. - Multiplayer-Ready: mark variables as Replicated/RepNotify, split logic into Server RPCs and OnRep, add
HasAuthority()guards. - C++ First: prefer C++ over Blueprints for new systems, expose API via
UFUNCTION(BlueprintCallable). - Plan First (Safety Net): for any 3+ tool-call request, the AI announces a numbered plan and waits for your "go" before executing.
Toggle state persists in Saved/CodeScape/enabled_rule_packs.json using atomic file writes (no corruption if the editor crashes mid-toggle). The injection point preserves Claude's prompt cache.
Prompt Reformulator
The wand button (🪄) next to the chat input rewrites your draft into the optimal CodeScape format before you send it. Powered by your active AI provider as a one-shot request that does NOT pollute the chat history.
v2.1 enriches the reformulator's system prompt with CodeScape-specific best practices:
- Multi-step requests get rewritten as numbered PASSES with explicit announce-before-tool-call instructions.
- Level design dimensions are converted to the
size:parameter in cm (never rawscale). - Tool names get spelled out by name when intent is clear (
spawn_actors,configure_sky_light,organize_outliner, etc.). - Anti-patterns get flagged (e.g.
Planeis not a valid actor class, use a thin Cube instead).
Press Ctrl + Shift + R to invoke without taking your hands off the keyboard. A second press undoes the rewrite.
size: parameter on spawn_actors
Before v2.1, spawn_actors only accepted scale (a multiplier on the mesh). LLMs frequently confused this with "target size in cm" and produced geometry 100x too big: scale:{x:3000} on a /Engine/BasicShapes/Cube (which is 100 cm by default) yields a 300-meter cube, not a 30-meter cube.
v2.1 adds an intuitive size parameter (alias size_cm) that takes target dimensions in centimeters and auto-derives the correct scale from the mesh's actual bounding box:
{"tool_name": "spawn_actors", "arguments": {"actors": [
{"actor_class": "Cube",
"location": {"x": 0, "y": 0, "z": 750},
"size": {"x": 3000, "y": 1600, "z": 1500},
"label": "Nave"}
]}}Result: a Cube measuring exactly 30 m x 16 m x 15 m, regardless of the underlying mesh's local size. The legacy scale parameter still works as before for cases where you genuinely want a multiplier.
size over scale for sized shapes, and warns that Plane is not a valid actor class (use a thin Cube for ground).
MCP Integration
Drive all 329 CodeScape tools from an external AI client (Claude Desktop, Claude Code, Cursor, …) via the Model Context Protocol.
What is MCP?
The Model Context Protocol (MCP) is an open standard for connecting AI models to external tools. CodeScape ships a small native C++ bridge (CodeScapeMCP.exe) that speaks MCP over stdio and forwards every tool call to the running editor over a local TCP socket.
- Build the bridge once.
CodeScapeMCP.exeis a standalone C++ executable you compile fromSource/CodeScapeMCP/BUILD.mdin the plugin. It ends up at<YourProject>/Plugins/CodeScape/Binaries/ThirdParty/CodeScapeMCP/Win64/CodeScapeMCP.exe. - Keep the editor open. Unreal Engine must be running with CodeScape loaded — the bridge only forwards. If the editor is closed, the client sees an empty tool list.
Connecting Claude Desktop
Enable MCP in CodeScape
Go to Project Settings → Plugins → CodeScape → MCP Server. It is enabled and set to auto-start on port 8765 by default, so there's usually nothing to change.
Edit Claude Desktop's config
claude_desktop_config.json belongs to Claude Desktop, not CodeScape. Open it from Claude Desktop → Settings → Developer → Edit Config (on Windows it lives at %APPDATA%\Claude\claude_desktop_config.json). Point command at the exe you built — in JSON, double every backslash:
{
"mcpServers": {
"codescape": {
"command": "C:\\YourProject\\Plugins\\CodeScape\\Binaries\\ThirdParty\\CodeScapeMCP\\Win64\\CodeScapeMCP.exe",
"args": ["--port", "8765"]
}
}
}Restart & use
Fully quit and reopen Claude Desktop. With the editor running, all 329 tools are now available — ask it to create Blueprints, materials, or any other UE5 asset.
Connecting Claude Code
Claude Code (the CLI) is an MCP client too, and it doubles as an agent: on top of the 329 CodeScape tools it can read/write files and run commands. Open a session in your project folder and register the bridge:
claude mcp add codescape -- "C:\YourProject\Plugins\CodeScape\Binaries\ThirdParty\CodeScapeMCP\Win64\CodeScapeMCP.exe" --port 8765The -- separator is required; everything after it is the command and its arguments. Add --scope project to write a shareable .mcp.json at the repo root instead of your per-user config. You can also let Claude Code do it for you: open a session on the plugin folder and ask it to build the bridge (it follows BUILD.md) and write the config itself.
.mcp.json written) mid-session won't appear until you relaunch. Run /mcp to check connection status. As with Claude Desktop, no API key is configured in CodeScape and the editor must be running.
Architecture
CodeScape is built as a pure C++20 Unreal Engine plugin with zero external dependencies.
Pipeline Overview
Natural language via chat panel or MCP client
AI enriches request with UE5 context and asset state
Dynamic 40KB+ system prompt sent to selected provider
Tool calls parsed from response (JSON + fallback scan)
O(1) TMap lookup routes to correct tool among 329
Native UE5 C++ execution with FScopedTransaction undo support
Key Stats
NodeForge Compiler
CodeScape's advanced Blueprint compiler converts DSL descriptions into production-ready node graphs.
13-Phase Layout Engine
- Topology scan
- Execution column assignment (layering)
- Spanning forest construction
- Pin geometry estimation
- Anchor-based Y assignment
- Cluster identification
- Overlap resolution (sweeping)
- Exec wire straightening
- Re-resolve post-straightening
- Data node anchoring
- Global overlap resolution
- Reroute nodes for collision avoidance
- Comment containment refit
Reporting bugs and getting help
If something goes wrong, the best thing you can do is send us the session report. CodeScape ships with a one-click bug reporter that captures everything we need to reproduce and fix.
The 30-second loop that fixes things fast
- Spot a problem: AI did the wrong thing, geometry is off, a tool errored, the editor froze. Anything weird.
- Click the bug button in the CodeScape chat header (top-right of the panel) right after the issue. Add a short description of what you expected vs what happened.
- Find the report folder the dialog points you to:
<YourProject>/Saved/CodeScape/Reports/Bugs/report_<timestamp>_<id>/ - Zip the entire folder (right-click, Send to, Compressed folder).
- Post the zip to Discord channel #SendReport with a one-line summary. We pick it up within a business day, fix the bug, ship the patch.
What goes inside a report
Each report folder contains everything we need to reproduce the issue:
manifest.json: report id, plugin version, engine version, OS, session uptime, error signatures.conversation.json: the full chat including every prompt, AI response, tool call, and tool result.timeline.json: chronological replay of every event with timestamps.activity_log.jsonl: line-by-line activity log.session_analytics.json: per-tool stats (calls, successes, failures, durations).provider_state.json: which AI provider and model were active, sanitized (no API keys).ue_log.txt: relevant slice of the Unreal editor log.user_description.txt: the description you typed in the dialog.
What to write in the description
Specific reports get fixed faster. The minimum useful set:
- Expected: what should have happened.
- Actual: what actually happened.
- Provider used: e.g. "MiniMax M2.7" or "Claude Sonnet 4.6". Often the bug is provider-specific.
- Reproduction: did it happen on the first try, or only after specific steps? Templates / Rule Packs enabled?
Expected: a 600 cm walkable room with a real door gap.
Actual: ceiling slab floats 1 meter above the walls.
Provider: MiniMax M2.7. Strict Greybox + Modular Architecture rule packs ON.
Repro: clicked the Walkable Room template and pressed Send. First attempt.Common issues you do NOT need to report
These are well-known and already documented in the Prompting Guide pitfalls:
- "Plane is not a valid actor class" error: use a thin Cube instead.
- generate_structure refused the call with "exceeds max 30": you passed cm instead of block counts.
- Editor stays dirty after a generation: press Ctrl+S to save the level.
- AI uses
list_assets_in_folderinstead of finding scene actors: ask it to useget_all_scene_actors.
Other contact channels
- Discord #SendReport: bug reports with attached zip. Fastest turnaround.
- Discord #general: questions, prompt help, feature suggestions.
- Email contact@codescape.dev: licensing, business inquiries, anything not appropriate for a public Discord.
FAQ
Does CodeScape affect my game's runtime performance?
No. CodeScape is an editor-only plugin. It generates standard UE5 assets (Blueprints, Materials, etc.) that run natively. Zero runtime overhead.
Can I use generated assets in commercial games?
Yes. All assets generated by CodeScape are standard UE5 assets that you own completely. No licensing restrictions on generated content.
How does the auto-backup work?
Before any tool modifies an asset, CodeScape creates a serialized backup. Combined with FScopedTransaction support, every operation can be undone with Ctrl+Z.
Can multiple team members use CodeScape simultaneously?
Yes. Each developer uses their own API keys and runs CodeScape independently. Assets are generated locally and can be committed to version control as usual.