Start in the right place.
Narrow down the target before you touch anything: look up scene objects, inspect their members and scan for data.
SELECTSCANMETHODSIn developmentUniversal Query Language for Unity
Query your game’s data and save the checks worth running again.
Drive UQL yourself, or connect your development agent to Unity.
How an investigation goes
Three small examples
A few lines of UQL find a field, check that an action changed a value and record a position at the moment you pick.
BUCKET $hits; VALUE $report = null;
SCAN FIELD health IN SCENE INTO $hits REPORT $report;
RECORD $report.Text; REGISTER health_scan;This excerpt searches for a field named health. Zero matches is a valid answer, and scan limits can stop a scan before it covers everything.
What this workflow does
SCAN searches the loaded scene for fields named health and saves a report of what it found. Pick a result and follow it down to its values.
Scan a scene, one object or a supported static scope.
See every path the scan found and how much of the scope it covered.
Register it so the next step of the investigation can use it.
VALUE $before = null; VALUE $after = null; VALUE $check = null;
BLOCK Test {
OBSERVE FIELDS hp = $boss.health INTO $before PHASE Before;
CALL PerformAction;
OBSERVE FIELDS hp = $boss.health INTO $after PHASE After;
CHECK health_changed: $after["hp"] != $before["hp"] INTO $check;
}This excerpt comes from a larger script that defines $boss and a PerformAction block. CHECK records an outcome and lets the script keep running.
What this workflow does
OBSERVE freezes the values you pick before and after an action. CHECK compares them and returns Pass, Fail or Inconclusive.
OBSERVE copies the fields you name, at that moment.
Call the block your script defines for it.
Look at the CHECK result: a run can finish with a failed check.
UQLSCRIPT PositionEvidence;
ALIAS $character = [SCENE:Character];
TRACEOPT manual = true;
VALUE $positionTrace = null;
BLOCK Begin {
TRACE $character.transform.position INTO $positionTrace;
UPDATE TRACE $positionTrace PHASE BeforeMovement;
}This example expects a scene object named Character. Run its Begin block in the UQL host. The block takes one sample and leaves the object where it is.
What this workflow does
TRACE follows a scene object’s position, and UPDATE TRACE takes a sample at a named point. Add more samples later and compare them on the same path.
Start the path at the scene object you want.
With manual TRACE, a sample is taken only where your script asks for one.
TRACE sees only the moments it samples, so a change that comes and goes between two samples won’t show up.
What UQL does
Find the data behind a bug and try a change. Then keep the check and run it again next time.
Narrow down the target before you touch anything: look up scene objects, inspect their members and scan for data.
SELECTSCANMETHODSNamed blocks turn a one-off question into a script you can rerun. Capture values before and after an action and compare them.
BLOCKOBSERVECHECKTRACE records the values you pick, sampled at the points you choose, including in supported hook workflows.
TRACEUPDATE TRACEHOOKConnect a compatible development agent through UQL’s local MCP integration. The agent finds your Unity host, looks up commands, runs scripts and reads what comes back.
Local MCPUnity hostGrants are UQL’s safety switches. For each source, you set whether a script may run, edit values, capture images or use events. Check the switches before a workflow starts.
Per-source grantsLogs, named reports and PNG captures (where supported) sit next to your check outcomes, so you can see what happened and how much each result covers.
LOGREGISTERCAPTUREWork with your agent
You pick what to investigate and write the steps in UQL with your agent. Then you both read the same results.
Browse the guides and commandsMake sure the agent has the right project and a ready session.
The agent reads the host’s help and runs with the grants the workflow needs.
Go through the reports and every CHECK outcome.
Your agent needs a local UQL host and an MCP setup.
A first workflow
Four steps to a first workflow. Command details and more examples are in the UQL documentation.
Work by hand in UQL’s Editor tools, or through a local agent connected over MCP. Check the project and session before the first command.
Read the command help, then find the object and member you need. Search small first and widen the search only if you have to.
Put repeatable work in a .uql script with named BLOCK entry points. Turn on the grants it needs, compile the group and run the block you want.
Go through the logs, the reports and each check’s Pass, Fail or Inconclusive outcome. Then switch off the grants you’re done with.
An observation freezes the values you select, not the whole object graph. A trace knows only what it sampled. Reading a property runs its getter. Grants control what a workflow may do, but they are not a security sandbox, and UQL does not roll back writes for you.
UQL and UDB
UDB is the visual browser. UQL is the query language and the scripts you rerun.
For developers who want to script their investigations, rerun their checks and connect an agent to Unity.
Switch between browsing in UDB and scripting in UQL as the bug hunt moves along.
Not yet. UQL is in development, and I’m building it for the full UDB package. When there’s something to download, the link goes on this page.
No. UQL is designed to work on its own, without UDB. The agent is optional too: UQL has Editor tools you can use by hand. To bring an agent in, you need a compatible MCP client and a connected local host.
No. The examples come from the UQL documentation, and this website can’t reach your Unity project. To run one yourself, swap in your targets and give it the script context it expects in your own UQL host.
No. Completed means the run finished. A workflow can complete with a failed or inconclusive check, so read each CHECK outcome and its reason.
Next time a value looks wrong