Mira Unreal scene
The user's Unreal Editor is your workbench. The tools that reach it:
| tool |
what it does |
unreal_status |
is it there, engine and plugin versions, project, open level, PIE, selection |
unreal_get_scene |
actors of the open level (labels, classes, folders, transforms), cameras, lights |
unreal_execute_python |
your Python runs in the Editor with the unreal module — the way you change anything |
unreal_search_api |
the unreal Python API of their exact engine version |
unreal_screenshot |
the level viewport or a camera (16:9 unless aspect says 9:16, 1:1 …), as an image |
unreal_import_generation |
a finished generation into /Game/Mira and the level: texture, media source, static or skeletal mesh |
unreal_setup_avatar |
a rigged generation or a skeletal mesh → avatar with an IK Rig, placed in the level |
unreal_apply_motion |
an animation generation retargeted through IK Retargeter onto the avatar |
unreal_avatar_speak |
a speech generation as the avatar's voice; mouth morph targets follow it |
unreal_playblast |
a camera recorded through a Level Sequence (16:9 unless aspect), uploaded as an MP4 for referenceVideoUrls |
unreal_build_player |
an Android .apk or an iOS package of the open project |
Everything runs on the user's machine with their permissions and every call is listed in their
Mira tab. Work like a careful colleague at their desk: look first, change in small steps, show
the result, ask before spending credits.
When to use
- A level, a set, lighting or a camera in Unreal; a generated model placed into it.
- An avatar: a Mira character (generate_3d with
rig, or rig_3d) or the user's skeletal mesh that moves and speaks.
- "Record it and make a clip": playblast → video model, as in mira-blender-scene.
- A test build to see it on a phone.
Not connected (unreal_status.connected == false): tell the user to open their project with Mira for
Unreal Engine (miralabs.art/unreal) in Plugins/, Window → Mira → sign in → Connect agents, and
stop. Do not retry in a loop.
Doctrine
Look before touching. unreal_status, then unreal_get_scene. Note the open level, the cameras,
what is selected, whether PIE is running (never change the level during PIE). An unreal_screenshot
at the start shows the framing the user is looking at.
Unreal is not Unity or Blender. Z is up, the coordinate system is left-handed (X forward, Y right),
units are centimetres, rotations are degrees as unreal.Rotator(roll=, pitch=, yaw=). A chair is
45 cm high, a door 210 cm, a basic-shape cube is 100 cm. Label every actor you make
(set_actor_label) and put a build in one Outliner folder (set_folder_path("Mira/Blockout")) so the
user can hide or delete it as a unit. Never rename, move or delete the user's actors unless asked.
One transaction per step. unreal_execute_python runs your code in the Editor's Python. Wrap
changes in with unreal.ScopedEditorTransaction("label"): so one Ctrl+Z undoes your whole step.
Use the subsystems — unreal.get_editor_subsystem(unreal.EditorActorSubsystem) and friends — not the
deprecated EditorLevelLibrary. print(...) comes back as output; print what you created. New assets
go under /Game/Mira/... only. Read references/scripting.md before the first call.
Look things up, don't guess. The Python API moves between 5.x releases (Sequencer channels, IK
Retargeter batch calls). unreal_search_api with words or an exact name answers for their version.
Small steps, verified. One call per logical step (floor, walls, lights, camera, sequence), each
followed by unreal_screenshot when the result is visual. On a Python error the traceback names the
line of your code: fix that line and rerun only that step. Never save levels or assets unless asked;
never touch Project Settings, plugins, .ini files or anything outside /Game/Mira.
Avatars. A Mira character for an avatar is generate_3d with rig: true (meshy-7) or rig_3d on
a finished model — characters in an A-pose with clear limbs (quote estimate_cost first). Then
unreal_setup_avatar(generationId) imports a skeletal mesh and builds its IK Rig; a report of missing
retarget chains means the rig is not humanoid enough — say so instead of forcing it.
unreal_apply_motion retargets the clips of any rigged generation (walking, running, dance presets of
rig_3d) onto the avatar. Speech: generate_audio (kind speech, quote the price) →
unreal_avatar_speak. Details: references/avatar.md.
Playblast for a video model. Same doctrine as mira-blender-scene: primitive shapes, plain
materials, one camera move, 3–10 s. Build the move as a Level Sequence with a CineCameraActor and a
Camera Cut track (references/sequencer.md); unreal_playblast renders it and uploads an MP4 tagged
as a blockout. Pass its url in referenceVideoUrls of generate_video with the shot described in words.
Phone builds need the Android SDK and NDK set up in the Editor, or a Mac with Xcode for iOS; if
unreal_build_player reports them missing, tell the user. Packaging cooks the whole project and can
take many minutes; ask first. Signing stays with the user.
Interview
Ask only what changes the build; one question at a time.
- What is it for: a level, a cinematic shot, an avatar demo, a clip?
- Is there a hero — a generated model, their own character, a product?
- For an avatar: what should it do (idle, walk, wave, talk) and say?
Defaults: a directional sun with a sky light, Cam_Main CineCamera at 160 cm eye height with a 35 mm
lens, 24 fps.
Checklist
Do not
- Do not delete, rename or move the user's actors or assets without asking; do not save levels.
- Do not enable plugins, change Project Settings or
.ini files, or write outside /Game/Mira.
- Do not start a package build or a long playblast without saying how long it may take.
- Do not start PIE yourself; ask the user to press Play.
1---2name: mira-unreal-scene3description: >-4 Build levels, characters and avatars inside the user's own Unreal Editor (UE 5.7 and 5.8) through5 the Mira MCP: read the level, change it with Python, import generated images, clips and 3D models,6 turn a rigged character into a talking, moving avatar through IK Rig, record a Sequencer playblast7 for a video model, and package an Android or iOS test build. Use it when the user says "do it in8 my Unreal", "собери сцену в анриле", "put the model in Unreal", "make an avatar",9 "apply this animation", "build for my phone", or when unreal_status reports a connected Unreal.10 Requires the Mira for Unreal Engine plugin (Window → Mira) with "Connect agents" on. NOT for 3D11 assets on their own (mira-3d), Unity (mira-unity-scene) or Blender scenes (mira-blender-scene).12license: MIT13metadata:14 source: https://skillmd.com/skills/global-ai-group-inc/mira-unreal-scene15 version: "0.1.0"16---1718# Mira Unreal scene1920The user's Unreal Editor is your workbench. The tools that reach it:2122| tool | what it does |23|---|---|24| `unreal_status` | is it there, engine and plugin versions, project, open level, PIE, selection |25| `unreal_get_scene` | actors of the open level (labels, classes, folders, transforms), cameras, lights |26| `unreal_execute_python` | your Python runs in the Editor with the `unreal` module — the way you change anything |27| `unreal_search_api` | the `unreal` Python API of their exact engine version |28| `unreal_screenshot` | the level viewport or a camera (16:9 unless `aspect` says 9:16, 1:1 …), as an image |29| `unreal_import_generation` | a finished generation into `/Game/Mira` and the level: texture, media source, static or skeletal mesh |30| `unreal_setup_avatar` | a rigged generation or a skeletal mesh → avatar with an IK Rig, placed in the level |31| `unreal_apply_motion` | an animation generation retargeted through IK Retargeter onto the avatar |32| `unreal_avatar_speak` | a speech generation as the avatar's voice; mouth morph targets follow it |33| `unreal_playblast` | a camera recorded through a Level Sequence (16:9 unless `aspect`), uploaded as an MP4 for `referenceVideoUrls` |34| `unreal_build_player` | an Android `.apk` or an iOS package of the open project |3536Everything runs on the user's machine with their permissions and every call is listed in their37Mira tab. Work like a careful colleague at their desk: look first, change in small steps, show38the result, ask before spending credits.3940## When to use4142- A level, a set, lighting or a camera in Unreal; a generated model placed into it.43- An avatar: a Mira character (generate_3d with `rig`, or rig_3d) or the user's skeletal mesh that moves and speaks.44- "Record it and make a clip": playblast → video model, as in mira-blender-scene.45- A test build to see it on a phone.4647Not connected (`unreal_status.connected == false`): tell the user to open their project with Mira for48Unreal Engine (miralabs.art/unreal) in `Plugins/`, Window → Mira → sign in → **Connect agents**, and49stop. Do not retry in a loop.5051## Doctrine5253**Look before touching.** `unreal_status`, then `unreal_get_scene`. Note the open level, the cameras,54what is selected, whether PIE is running (never change the level during PIE). An `unreal_screenshot`55at the start shows the framing the user is looking at.5657**Unreal is not Unity or Blender.** Z is up, the coordinate system is left-handed (X forward, Y right),58units are **centimetres**, rotations are degrees as `unreal.Rotator(roll=, pitch=, yaw=)`. A chair is5945 cm high, a door 210 cm, a basic-shape cube is 100 cm. Label every actor you make60(`set_actor_label`) and put a build in one Outliner folder (`set_folder_path("Mira/Blockout")`) so the61user can hide or delete it as a unit. Never rename, move or delete the user's actors unless asked.6263**One transaction per step.** `unreal_execute_python` runs your code in the Editor's Python. Wrap64changes in `with unreal.ScopedEditorTransaction("label"):` so one Ctrl+Z undoes your whole step.65Use the subsystems — `unreal.get_editor_subsystem(unreal.EditorActorSubsystem)` and friends — not the66deprecated `EditorLevelLibrary`. `print(...)` comes back as output; print what you created. New assets67go under `/Game/Mira/...` only. Read `references/scripting.md` before the first call.6869**Look things up, don't guess.** The Python API moves between 5.x releases (Sequencer channels, IK70Retargeter batch calls). `unreal_search_api` with words or an exact name answers for their version.7172**Small steps, verified.** One call per logical step (floor, walls, lights, camera, sequence), each73followed by `unreal_screenshot` when the result is visual. On a Python error the traceback names the74line of your code: fix that line and rerun only that step. Never save levels or assets unless asked;75never touch Project Settings, plugins, `.ini` files or anything outside `/Game/Mira`.7677**Avatars.** A Mira character for an avatar is `generate_3d` with `rig: true` (meshy-7) or `rig_3d` on78a finished model — characters in an A-pose with clear limbs (quote `estimate_cost` first). Then79`unreal_setup_avatar(generationId)` imports a skeletal mesh and builds its IK Rig; a report of missing80retarget chains means the rig is not humanoid enough — say so instead of forcing it.81`unreal_apply_motion` retargets the clips of any rigged generation (walking, running, dance presets of82rig_3d) onto the avatar. Speech: `generate_audio` (kind speech, quote the price) →83`unreal_avatar_speak`. Details: `references/avatar.md`.8485**Playblast for a video model.** Same doctrine as mira-blender-scene: primitive shapes, plain86materials, one camera move, 3–10 s. Build the move as a Level Sequence with a CineCameraActor and a87Camera Cut track (`references/sequencer.md`); `unreal_playblast` renders it and uploads an MP4 tagged88as a blockout. Pass its `url` in `referenceVideoUrls` of `generate_video` with the shot described in words.8990**Phone builds** need the Android SDK and NDK set up in the Editor, or a Mac with Xcode for iOS; if91`unreal_build_player` reports them missing, tell the user. Packaging cooks the whole project and can92take many minutes; ask first. Signing stays with the user.9394## Interview9596Ask only what changes the build; one question at a time.97981. What is it for: a level, a cinematic shot, an avatar demo, a clip?992. Is there a hero — a generated model, their own character, a product?1003. For an avatar: what should it do (idle, walk, wave, talk) and say?101102Defaults: a directional sun with a sky light, `Cam_Main` CineCamera at 160 cm eye height with a 35 mm103lens, 24 fps.104105## Checklist106107- [ ] `unreal_status` connected, no PIE; `unreal_get_scene` read; a screenshot taken before changes.108- [ ] Centimetres, Z-up, Rotator by keyword; actors labelled and foldered; every step in a transaction.109- [ ] Credits quoted (`estimate_cost`) and confirmed before `generate_3d`, `rig_3d`, `generate_audio`, `generate_video`.110- [ ] Avatar: IK Rig built without missing chains, motion applied, speech assigned; tell the user to press Play or scrub the sequence.111- [ ] Final `unreal_screenshot` shown to the user; nothing saved unless they asked.112113## Do not114115- Do not delete, rename or move the user's actors or assets without asking; do not save levels.116- Do not enable plugins, change Project Settings or `.ini` files, or write outside `/Game/Mira`.117- Do not start a package build or a long playblast without saying how long it may take.118- Do not start PIE yourself; ask the user to press Play.