Skip to content

About

Index a Unity project and answer what the editor cannot: what references this asset, what breaks if you move it, what is unused, what is already broken, and where the build size went. Zero dependencies, no Unity required.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Sonekk X-Ray

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.

Quick start

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 readable

How it works

Every 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.

False positives, read this

  • 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 ScriptableObject instances 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.

Limits

  • 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.

License

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)

About

Index a Unity project and answer what the editor cannot: what references this asset, what breaks if you move it, what is unused, what is already broken, and where the build size went. Zero dependencies, no Unity required.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages