ArTchie Studios

Agent Project Dump

One fat JSON snapshot of the Unity project. CLI agents should hit this first.

Editor-only. Unity 2021.3+. Lives in Anvil.Editor (includePlatforms: Editor). No extra packages.

Editor window

ArTchie / Anvil / Agent Project Dump

Button What it does
Scan Collects version, player names, build target, build scenes, Assets/ scenes, asmdefs, compile-error count, kit version.
Copy JSON Puts the dump JSON on the clipboard.
Write report Writes <project>/AnvilReports/agent-project-dump.json (creates the folder if needed).

Scene listing is limited to Assets/ (skips Packages/ and Library/). Asmdefs include Assets/ and Packages/ so agents see the real compile graph; Library/ is skipped.

Batchmode (CI)

Unity -batchmode -nographics -quit -projectPath <proj> -executeMethod Anvil.AgentProjectDump.RunBatch -anvil-out <file.json>
Arg Meaning
-anvil-out <file.json> Output path. Default: <project>/AnvilReports/agent-project-dump.json
-anvil-fail Exit code 1 if compileErrors > 0; otherwise 0. Unknown (-1) does not fail.

RunBatch only calls EditorApplication.Exit when Application.isBatchMode is true. It logs compileErrors=, scene/asmdef counts, and the output path.

Also accepts -anvil-out=file.json.

JSON

{
  "tool": "AgentProjectDump",
  "generatedUtc": "2026-08-18T02:00:00Z",
  "unityVersion": "2021.3.45f1",
  "productName": "Demo",
  "companyName": "ArTchie-Studio",
  "buildTarget": "StandaloneWindows64",
  "buildScenes": [
    { "path": "Assets/Scenes/Main.unity", "enabled": true }
  ],
  "scenes": [
    "Assets/Scenes/Main.unity",
    "Assets/Scenes/Dev.unity"
  ],
  "asmdefs": [
    {
      "name": "Game.Runtime",
      "path": "Assets/Game.Runtime.asmdef",
      "references": ["Unity.TextMeshPro"]
    }
  ],
  "compileErrors": 0,
  "anvilVersion": "0.1.0"
}
Field Source
unityVersion Application.unityVersion
productName / companyName PlayerSettings
buildTarget EditorUserBuildSettings.activeBuildTarget
buildScenes EditorBuildSettings.scenes (path, enabled)
scenes Every scene asset under Assets/
asmdefs AssemblyDefinitionAsset name + path + references array as stored (including GUID:… form)
compileErrors Best-effort integer; -1 if unavailable
anvilVersion com.artchie.anvil package.json / PackageInfo.FindForAssembly, else "0.1.0"

Compile errors (best-effort)

Unity 2021.3 CompilationPipeline has no snapshot “get compiler messages” API. The dump tries, in order:

  1. Internal UnityEditor.LogEntries via reflection — count console rows whose message looks like error CS / error BC / “Scripts have compiler errors”. If row iteration is missing, falls back to GetCountsByType (all console errors, not just compiler).
  2. Tail of Application.consoleLogPath (or -logFile), last 2 MiB after the last domain reload, counting the same patterns.
  3. -1 if both probes are missing or throw.

This is not a substitute for a full compile. Treat -1 as “unknown”, not “clean”.

Notes

  • Empty projects write a valid dump: empty arrays, compileErrors 0 or -1, anvilVersion "0.1.0".
  • A missing AnvilReports folder is created on write.
  • Does not modify assets, build settings, or player settings. Does not touch runtime player code.

Source in the box: Assets/ArTchie Studios/ArTchie-Suite/com.artchie.anvil/Documentation/AgentProjectDump.md