unity-assetdb
Walks a Unity project's Assets/ tree, parses .meta and asset YAML, and writes a
compact bincode index that maps asset GUIDs (and sub-asset fileIDs) to human-readable
names. Designed for tooling that needs to reason about Unity assets by name without
loading the editor.
Originally extracted from a Unity prefab YAML ↔ JSON converter. Reusable by any tool that wants the same GUID→name index — e.g. a Rust-side asset-catalog baker for the Unity client.
Crate layout
store— on-disk schema (AssetDb,AssetEntry,SubAsset,AssetType).class_id— Unity classID enum (Sprite=213,Prefab=1001, …).meta—.metaparser (top-level GUID, sprite-sheet sub-assets, importer fields).asset— asset YAML parser (top class ID,m_Script.guid, sub-doc enumeration).walk— project-root resolver + parallelAssets/walker.bake— orchestrator:BakeOptions { project_root, out_dir, name_sanitizer, on_warn, on_progress }.
CLI
Without --project, walks up from the cwd until both Assets/ and ProjectSettings/
are found. Without --out-dir, writes to <project>/Library/unity-assetdb/.
Profiling
just profile (hyperfine cold/warm + phase breakdown) and just profile-flamegraph (samply). See docs/profiling.md
for baseline numbers and per-phase semantics.
Status
- API stability: pre-1.0; signatures may shift.
- Errors: internal
anyhow::Resulteverywhere. Public API will move tothiserrortypes before 1.0.