Build an Unreal Engine level from a prompt
Blocking out a level is where an AI in the editor pays off fastest: dozens of actors placed, scaled and lit from one description, and every step stays undoable. This guide shows the workflow with the tools that act in Unreal MCP Pro 1.0.3, and where to switch to editor Python.
What works well
- Greybox and blockout levels from basic shapes or meshes you already have.
- Lighting passes: sun, sky, skylight, local lights, Lumen and post-process settings.
- Mass edits: rename, tag, re-mesh, move or re-light many actors at once.
- Asking questions about a level: what is in it, how heavy it is, which actors match a filter.
Units and conventions
- Unreal units are centimetres, Z is up. Locations and scales are strings
"x,y,z", rotations"pitch,yaw,roll". - Actors are addressed by their label (the name in the Outliner). Ask the AI to give every actor a clear label; later calls depend on it.
- Asset paths are object paths, for example
/Engine/BasicShapes/Cube.Cubeor/Game/Meshes/SM_Wall.SM_Wall.
1. Start from a known state
get_level_info and get_world_outliner tell the AI what is already there. For a clean slate, new_level creates an empty level; load_level opens an existing one. Make sure Play In Editor is stopped: editing tools refuse to run during PIE.
2. Block out in batches
One batch_spawn_actors call places many actors. Use StaticMeshActor for geometry:
batch_spawn_actors {
"actors": [
{ "class": "StaticMeshActor", "label": "Floor", "location": "0,0,0" },
{ "class": "StaticMeshActor", "label": "Wall_N", "location": "0,1000,150" },
{ "class": "StaticMeshActor", "label": "Wall_S", "location": "0,-1000,150" },
{ "class": "StaticMeshActor", "label": "Wall_E", "location": "1000,0,150" },
{ "class": "StaticMeshActor", "label": "Wall_W", "location": "-1000,0,150" }
]
}
New StaticMeshActors have no mesh. Give all of them one in a single call; batch_set_property accepts a component class name:
batch_set_property {
"labels": ["Floor", "Wall_N", "Wall_S", "Wall_E", "Wall_W"],
"component": "StaticMeshComponent",
"property": "StaticMesh",
"value": "/Engine/BasicShapes/Cube.Cube"
}
spawn_actor has a template argument, but the plugin ignores it in 1.0.3. Set meshes as above, or for a single actor with set_component_property (call list_components first to get the component name, usually StaticMeshComponent0).
3. Arrange and refine
batch_transform sets location, rotation and scale for many actors (the basic cube is 100 cm, so a scale of 20,20,0.2 gives a 20 m floor). For single actors: set_transform, move_actor, duplicate_actor with an offset, snap_to_ground, set_mobility. Organise with set_actor_tag and group_actors; tags make later edits easy (find_actors with tag).
4. Light it
add_lightwithtypedirectional,point,spotorrect, plus location, intensity and"r,g,b"color.set_light_propertychangesintensity,color,temperature,cast_shadows,attenuation_radiusand cone angles.add_sky_atmosphereandset_skylight(spawns a skylight if there is none; intensity, colour, real-time capture).set_lumen_settingsturns Lumen GI and reflections on and sets the quality.
5. Colour and post process
create_material_instance from a parent material, assign_material to actors, then add_post_process_volume (with unbound to affect the whole level) and set_post_process_settings for exposure, bloom, vignette, saturation, contrast and ambient occlusion. The materials and lighting guide covers this in detail.
6. Check the result
get_world_outliner,find_actorsandget_actor_infoto verify what exists and where.get_scene_statsfor actor and triangle counts.focus_on_actororset_viewport_camera, thencapture_viewport: it saves a PNG underSaved/Screenshotsand returns the path. The image is not sent to the model; open it yourself, or use a client that can read local images.- Anything wrong:
undo, or Ctrl+Z in the editor. Every edit is a transaction.
7. Save
save_level (with path for a new level, for example /Game/Maps/Courtyard). Optionally play_in_editor to walk through it and stop_pie to return.
Landscapes and foliage
In 1.0.3 the landscape tools (create_landscape, sculpt_landscape, paint_landscape_layer, import_heightmap) and the foliage painting tools answer with manual or Python steps instead of acting; get_landscape_info and get_foliage_info do work. Create and sculpt the landscape with the Landscape mode (or editor Python through execute_python), then let the AI place and snap_to_ground actors on it.
A complete prompt
Create a new level. Block out a 20 x 20 m courtyard: a floor and four 3 m high walls
from /Engine/BasicShapes/Cube.Cube, labelled Floor and Wall_N/S/E/W, all tagged
"courtyard". Put a 4 m lamp post (a thin cylinder) in the centre with a warm point
light at the top. Add a directional light low in the west, sky atmosphere and a
skylight, and turn on Lumen. Then list the actors, capture the viewport and save
the level as /Game/Maps/Courtyard.
Expect the AI to plan first, then use the batch tools, then check with the outliner. If it reaches for a tool that does not act yet, it gets the manual steps back and can switch to another route.
Get Unreal MCP Pro
$5 once on itch.io, free updates.