Reference
Unreal plugin
The LoomEditor plugin builds Blueprints from Loom sources: in the editor whenever a source changes, or from the command line without the editor.
- Module
- LoomEditor
- Settings
- Project Settings › Plugins › Loom
- Output
- Intermediate/Loom/
What it adds to the editor
Section titled “What it adds to the editor”And elsewhere in the editor:
| Item | Where | Does |
|---|---|---|
| Loom listing | Message Log | Build errors, on a new Build page for each build that has any |
| Notifications | Editor | Say when a build built something or failed |
| Log categories | Output Log | LogLoomBuild, LogLoom, LogLoomBuildCommandlet, LogLoomTest |
There are no toolbar buttons or Content Browser menu entries. None of this is set up when Unreal runs a commandlet.
Sources and Blueprints
Section titled “Sources and Blueprints”Every .lm file under the project’s Content folder is a Loom source, and makes the Blueprint
beside it.
| Source | Blueprint |
|---|---|
Content/Counter/BP_Counter.lm |
/Game/Counter/BP_Counter |
- Only the project’s own
Contentis searched, so.lmfiles in a plugin’s content aren’t built. - All sources compile together, so one source can use the Blueprints another makes.
- Loom marks each Blueprint it makes with the description
Generated by loom. Source: Content/Counter/BP_Counter.lm, and refuses to overwrite any Blueprint without it. - A Loom Blueprint is remade from its source on every rebuild, so changes made in the Blueprint editor are lost.
| When you | The Blueprint |
|---|---|
| Delete the source | Stays where it is, and is no longer rebuilt |
| Rename or move it, header unchanged | Is left alone; the build fails because the header no longer matches the file’s place |
| Rename or move it, header updated | A new one is made at the new place; the old one stays |
Builds in the editor
Section titled “Builds in the editor”| A build starts on | Rebuilds |
|---|---|
Any change to a .lm file under Content: saving from any text editor, creating, renaming, moving or deleting |
Changed Blueprints |
| Tools › Rebuild All Blueprints | Every Blueprint |
| Scripting the editor | Every Blueprint, by default |
The build starts half a second after the first change, and changes in that time join it. Opening the editor doesn’t start one.
What gets rebuilt
Section titled “What gets rebuilt”- Every build compiles all the sources, then rebuilds only the Blueprints whose compiled form changed. Saving one source can rebuild other Blueprints that use it.
- A new version of Loom rebuilds everything.
- Blueprints are built in order, each after the ones it uses. One that fails doesn’t stop the build: the rest are still built, except those that use it, which are skipped until it builds.
- Any open Blueprint editor for a Blueprint being rebuilt is closed first.
Results
Section titled “Results”| Outcome | Notification |
|---|---|
| Something was built | Loom: built 1 Blueprint or Loom: built 3 Blueprints, for 3 seconds |
| The build failed | Loom: the build failed, linking to the Message Log |
| Nothing changed | None |
Each error is one entry in the Message Log’s Loom listing. Errors from the compiler give the file, line and column; errors from Unreal building the Blueprint give only the file:
Content/Counter/BP_Counter.lm:6:13: no variable CoutnContent/X/BP_A.lm: /Game/X/BP_A was not made by loom; refusing to overwrite itSettings
Section titled “Settings”Under Project Settings › Plugins › Loom, saved to Config/DefaultLoom.ini. They’re read at every
build, so a change applies to the next one.
| Setting | Default | Meaning |
|---|---|---|
| Instanced Class Paths | Empty | Folders whose Blueprint classes a Loom Blueprint may use as components and widgets |
Instanced Class Paths
Section titled “Instanced Class Paths”- While the list is empty, every class is allowed. Native (
/Script/…) classes are always allowed. - A path covers its folder and everything under it:
/Game/Libcovers/Game/Lib/X, not/Game/Library/X. A trailing slash is fine. - Set it when some of the project’s Blueprints are stand-ins for classes defined elsewhere, as in a mod kit. List only the folders whose Blueprints are real. Modding Whiskerwood is an example.
A class outside the list fails the build with:
<Class> is a Blueprint class outside the project's InstancedClassPaths (<paths>); a component or widget must be a native class or a Blueprint class under one of them, as set in Project Settings > Plugins > LoomBuilding without the editor
Section titled “Building without the editor”The LoomBuild commandlet builds the project the same way saving does in the editor. It suits build servers and scripts.
<engine>\Engine\Binaries\Win64\UnrealEditor-Cmd.exe MyProject.uproject -run=LoomBuild -report=report.json -unattended -nullrhi
<engine>/Engine/Binaries/Linux/UnrealEditor-Cmd MyProject.uproject -run=LoomBuild -report=report.json -unattended -nullrhi
| Flag | Does |
|---|---|
-run=LoomBuild |
Runs the build |
-force |
Rebuilds every Blueprint, even unchanged ones |
-report=<path> |
Also writes the report there. Optional |
-unattended -nullrhi |
Unreal’s own: no dialogs, no rendering |
| Exit | Means |
|---|---|
0 |
The build worked: every Blueprint built or unchanged |
1 |
The build failed, or the -report file couldn’t be written |
Errors go to the log as LoomBuild: <file>:<line>:<column>: <message>, and the report is saved as
below.
The build report
Section titled “The build report”Every build, in the editor or not, saves a report to Intermediate/Loom/report.json as one line of
JSON. It’s mostly for scripts and agents.
| Field | Type | Meaning |
|---|---|---|
ok |
bool | Every source compiled and every Blueprint was built or unchanged |
sources |
number | How many .lm files there were. Missing if the build stopped before counting |
errors |
array | {file, line, column, message}. line and column only when known; file is "" when not tied to a source |
blueprints |
array | {path, source, status}, status built, unchanged, failed or skipped. A skipped one also has uses, the Blueprint it uses that wasn’t built. Empty if the compile failed |
{
"sources": 2,
"ok": true,
"errors": [],
"blueprints": [
{"path": "/Game/Shop/BP_Till", "source": "Content/Shop/BP_Till.lm", "status": "unchanged"},
{"path": "/Game/Shop/BP_Customer", "source": "Content/Shop/BP_Customer.lm", "status": "built"}
]
}{
"sources": 1,
"ok": false,
"errors": [
{"file": "Content/Counter/BP_Counter.lm", "line": 6, "column": 13,
"message": "no variable Coutn"}
],
"blueprints": []
}Details: a failed Blueprint’s report
A Blueprint with status failed also has a report, for working out what went wrong:
ops: each step applied, up to the one that failed, with its errorcompile: Unreal’s compile result, with its errors and warningsgraphs: a text export of each graphsaved: the saved file, if it got that farerror: a problem with the build’s own files
Testing
Section titled “Testing”The LoomTest commandlet calls a compiled Blueprint’s functions and checks the values they leave, as a test file describes.
<engine>\Engine\Binaries\Win64\UnrealEditor-Cmd.exe MyProject.uproject -run=LoomTest -test=test.json -report=report.json -unattended -nullrhi
<engine>/Engine/Binaries/Linux/UnrealEditor-Cmd MyProject.uproject -run=LoomTest -test=test.json -report=report.json -unattended -nullrhi
Both -test and -report are required. This test file, from the sum demo, checks Sum and
Status from Modding Whiskerwood:
{ "blueprint": "/Game/Mods/PK_LoomSum/BP_MapLoad", "cases": [ { "name": "sums 0 to 100", "call": "Sum", "args": { "N": "100" }, "expect": { "Total": "5050" } }, { "name": "what the mod log says", "call": "Status", "expect": { "return": "PK_LoomSum: Total 5050" } } ]}| Field | Meaning |
|---|---|
blueprint |
The compiled Blueprint to test. Required |
world |
Run the cases in a world of the test’s own. Default false |
cases |
The cases to run |
name |
Shown in the log and report |
call |
The function to call. Required |
args |
Parameter values |
set |
Blueprint variables to set before each call |
expect |
Values to check after the last call, and the ticks: return, a variable, or a parameter as the call left it |
repeat |
Call this many times; the report says how long they took. Default 1 |
ticks |
Tick the world this many times after the last call, so timers fire. Needs world. Default 0 |
dt |
The seconds each tick passes. Default 0.1 |
Values are written as Unreal writes them as text, such as 0.500000 for a float, and compared as
text. A case also fails if the Blueprint logs a script warning or error while it runs or ticks,
such as a runaway loop.
Functions run on the Blueprint’s class default object, which needs no world. With "world": true
they run on an object of the class in a game world of the test’s own: an actor spawned there, or
any other object made in it. Its cases share that object, one after another. Ticking the world
fires the timers the Blueprint sets, but the world has no game mode, so actors’ BeginPlay and
Tick don’t run. A case that sets a half-second timer and gives it "ticks": 10 can expect what
the timer’s function did.
| Exit | Means |
|---|---|
0 |
Every case passed |
1 |
A case failed, or the test or Blueprint couldn’t be loaded |
2 |
-test or -report missing |
| Each case’s result | |
|---|---|
ok |
Whether it passed |
got |
What each expected value was |
error |
Why it couldn’t run |
calls, seconds |
How many calls, and how long |
Scripting the editor
Section titled “Scripting the editor”A build can be started from the editor’s Python, or from an editor Blueprint, where the function is in the Loom category. It builds as saving does, shows the same notifications, and returns the report as JSON text.
report = unreal.LoomLibrary.build_blueprints() # every Blueprintreport = unreal.LoomLibrary.build_blueprints(False) # only changed onesWhat ships inside the plugin
Section titled “What ships inside the plugin”Two programs, which the plugin runs itself. There’s nothing to configure.
| Program | Windows path, in LoomEditor/Binaries/ThirdParty/Loom/ |
What it is |
|---|---|---|
loom |
Win64/loom.exe |
The compiler, run for every build |
loom-mcp |
Win64/loom-mcp.exe |
The MCP server a coding agent runs |
| Program | Linux path, in LoomEditor/Binaries/ThirdParty/Loom/ |
What it is |
|---|---|---|
loom |
Linux/loom |
The compiler, run for every build |
loom-mcp |
Linux/loom-mcp |
The MCP server a coding agent runs |
The programs are under the same licence as the plugin. See License.
Build errors
Section titled “Build errors”Errors the plugin gives while making a Blueprint. Errors in the Loom code itself are in the language reference.
| Message | Means | What to do |
|---|---|---|
<path> was not made by loom; refusing to overwrite it |
Something not made by Loom is already at that path | Move the existing asset, or the source |
<path> exists and is not a Blueprint |
Another kind of asset is at that path | Move the existing asset, or the source |
<path> has parent <old>, not <new> |
The source’s parent class changed | Delete the Blueprint by hand, then build |
<path> is a widget Blueprint, and the ops say otherwise |
The source changed between widget and non-widget | Delete the Blueprint by hand, then build |
compile finished <status> with <n> errors and <n> warnings |
Unreal’s compile of the Blueprint wasn’t clean. Warnings count as failures | See compile in the report |
could not add variable <name>; the name may collide with an inherited member |
The parent class already has that name | Rename the variable |
the Loom compiler is missing from the plugin: no <path> |
The plugin folder is incomplete | Install the plugin again |