Index a Unity project and answer the questions the editor cannot:
- What references this asset? reverse lookup, transitively across prefabs, scenes, materials and scripts
- What breaks if I delete or move it? the blast radius, with file paths
- What is dead weight? unused assets with the real megabytes you would recover
- What is already broken? references to GUIDs that do not exist
- Where did the build size go? size attribution by folder
Runs on your project as files on disk. No Unity install, no editor, no dependencies.
npm install -g sonekk-xray
sonekk-xray index "C:/Projects/MyVrGame"project: C:/Projects/MyVrGame
assets: 4812
unused: 214 (1.83 GB)
broken references: 3
duplicate GUIDs: 0
sonekk-xray unused <project> # dead assets, biggest first
sonekk-xray uses <project> Assets/Textures/Wall.png
sonekk-xray broken <project> # GUIDs that resolve to nothing
sonekk-xray size <project> # megabytes by folder
sonekk-xray index <project> --json # machine readableEvery Unity asset has a .meta file with a GUID. Text assets (.prefab, .unity, .mat, .asset, .controller, .anim) reference each other by {fileID: N, guid: X}. X-Ray reads both, builds a directed graph, and then answers questions by walking it.
Unused detection starts from the scenes listed in ProjectSettings/EditorBuildSettings.asset plus everything under any Resources/ folder, walks forward to mark what ships, then reports assets nothing references.
- Assets loaded by name at runtime from
Resources/, Addressables or AssetBundles look unused.Resources/is handled, the other two are not yet. - Code that builds references by string, or
ScriptableObjectinstances created at runtime, cannot be seen. - Anything referenced only by a package asset outside
Assets/will look like a missing GUID. - Treat the unused list as candidates to review, never as a delete list.
- Text serialisation only. Projects using force-binary asset serialisation will index almost nothing.
- Package cache and Library are skipped on purpose.
- No UI yet. The desktop viewer with a graph and a 3D preview is the next step.
PolyForm Small Business 1.0.0. Free for companies under 100 people and under 1M USD revenue.
Required Notice: Copyright 2026 sonekkdev (https://github.com/sonekkdev/sonekk-xray)