Logo vun UnityAssetDB

UnityAssetDB

Organisatioun
song-chaoyang

đŸ—„ïž Every Unity asset reference in one queryable database. Rust + SQLite + tree-sitter. CLI + Web UI + MCP server.

Editeursong-chaoyang
RepositoryUnityAssetDB
SproochRust
Forks
5
StÀren
63
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    UnityAssetDB stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopĂ©ieren

    Benotzt d'Installatiounsbeispiller, fir dĂ«se Server an Ärem bevorzugte MCP-Client ze konfigurĂ©ieren.

  • Indicateure fir Open Source

    63 StÀren an 5 Forks aus dem verlinkte Repository.


Why UnityAssetDB?

Unity projects grow into tangled webs of asset dependencies. "Who references this material?" "Is this texture safe to delete?" "Which scenes use this prefab?" — answering these questions by hand means grepping through thousands of YAML files.

UnityAssetDB indexes your entire Unity project into a SQLite database and answers these questions in under 1 millisecond.

$ unityassetdb refs Assets/Materials/Enemy.mat

📂 Assets/Materials/Enemy.mat (2 referenced by)
────────────────────────────────────────────────────────────────
  ← Assets/Scenes/Game.unity [scene] via depends_on (guid-file)
  ← Assets/Scenes/Game.unity [scene] via instance_of
2 reference(s) total

✹ Key Features

FeatureWhat it does
🔗 Reference TrackingTrace any asset's incoming/outgoing dependencies via GUID resolution
🌳 Hierarchy BrowserNavigate GameObject trees, component bindings, Transform parent/child
🔬 C# Script Analysistree-sitter powered class/method extraction + MonoBehaviour binding
📁 Virtual File SystemQuery assets as virtual paths with glob, grep, and tree listing
🌐 Interactive Web UIvis.js dependency graph, click-to-explore, REST API
🔌 MCP ServerJSON-RPC over stdio — integrate with any MCP-compatible tool
⚡ Blazing FastRust + SQLite + rayon parallelism — 10,000+ files/sec
📩 Zero DependenciesSingle static binary, no runtime needed

Quick Start

Install

bash
# Download pre-built binary (macOS / Linux / Windows)
# → https://github.com/song-chaoyang/UnityAssetDB/releases

# Or build from source
cargo install --git https://github.com/song-chaoyang/UnityAssetDB

3 Steps to Go

bash
# 1ïžâƒŁ  Index your Unity project
unityassetdb index build /path/to/your/unity/project

# 2ïžâƒŁ  Query references
unityassetdb refs Assets/Materials/Enemy.mat -p /path/to/project

# 3ïžâƒŁ  Launch the Web UI
unityassetdb serve /path/to/project --port 8089

Live Progress Feedback

The 8-phase pipeline renders a live multi-bar display — weighted overall percentage + ETA, a phase bar with throughput and live extraction stats, and the file currently being processed:

â ž [00:00:12] ████████████░░░░░░░░  48% 3/8 extract · ETA 08s
â č ████████████████░░░░░  extract 31,422/54,120 · 2,615/s · 892K objs · 1.2M refs · 2.3 GB
  📄 Assets/Scenes/MainMenu.unity

When it finishes, you get a per-phase timing breakdown so you always know where the time went:

  phase breakdown:
    scan          1.8s  ████████████████████
    register      0.6s  ██████
    extract      14.2s  ████████████████████████████
    assets        0.9s  ██
    graph         2.7s  █████
    bind          0.4s  █
    vfs           1.1s  ██
    publish       0.2s
✅ Index built in 21.4s: .unityassetdb/index.db (54,120 files, 12,830 assets, 8,221 scripts bound, 2,529 files/s)

Demo: Reference Query


CLI Reference

unityassetdb <COMMAND>

Commands:
  index   Index management (build / sync / status)
  refs    Query the reference graph for a VFS path
  ls      List VFS entries under a path
  glob    Find VFS entries matching a glob pattern
  grep    Search content within VFS entries
  read    Read content of a VFS entry
  serve   Start web server with interactive graph UI
  mcp     Start MCP server (JSON-RPC over stdio)
  help    Print this message

Common Queries

bash
# Who references this material? (incoming)
unityassetdb refs Assets/Materials/Enemy.mat -p /project

# What does this scene depend on? (outgoing)
unityassetdb refs Assets/Scenes/Game.unity -p /project --direction out

# Filter to file-level results only
unityassetdb refs Assets/Materials/Enemy.mat -p /project --filter File

# Browse the asset tree
unityassetdb ls Assets -p /project --depth 2

# Find all prefabs
unityassetdb glob "*.prefab" -p /project

# Search for a class name in indexed content
unityassetdb grep "PlayerController" -p /project

# View index statistics
unityassetdb index status /project

Architecture

How It Works

UnityAssetDB runs a 7-stage indexing pipeline:

StageWhat happens
1. DiscoveryWalk Assets/, Packages/, ProjectSettings/ with walkdir. Parse .meta files for GUIDs.
2. ExtractParse Unity YAML (.unity, .prefab, .mat, .asset) with serde_yaml. Parse C# with tree-sitter. Extract objects, references, declarations.
3. ResolveBuild entity graph: GameObject→Component edges, Transform hierarchy, prefab instance links, script-to-symbol bindings.
4. MaterializeProject entities into a Virtual File System (VFS) with queryable paths and edges.
5. FinalizeIntegrity checks — verify no broken VFS edges.
6. PublishAtomic SQLite database swap-in.
7. SyncIncremental update — only re-index changed files based on content hash.

SQLite Schema — 19 Tables

LayerTablesPurpose
Filesfiles, assemblies, assembly_referencesTrack every file + .meta GUID
YAMLyaml_objects, yaml_referencesParsed Unity YAML structure + references
C#cs_declarations, cs_mentions, symbols, symbol_edgestree-sitter extracted code structure
Graphassets, entities, entity_edges, entity_symbol_edgesEntity relationship graph
VFSvfs_entries, vfs_edgesVirtual file system for querying
Metaprojects, index_diagnostics, rebuild_summaryIndex metadata

VFS Edge Types

EdgeMeaning
child_ofDirectory → file, parent → child
defined_inNode → file where it's defined
depends_onFile → referenced file (via GUID)
instance_ofPrefab instance → source prefab
binds_toComponent → C# script class
refsGeneral reference edge

REST API

When running serve, these endpoints are available:

EndpointDescription
GET /api/statusIndex statistics (file count, asset count, etc.)
GET /api/ls?path=...&depth=NList VFS children
GET /api/refs?path=...&direction=in&filter=ALLReference query
GET /api/glob?pattern=...&entry_type=ALLGlob search
GET /api/grep?pattern=...&path=...Content search
GET /api/read?path=...Read VFS entry content
GET /api/graph?path=...Subgraph for visualization (nodes + edges)

MCP Server

UnityAssetDB can run as an MCP (Model Context Protocol) server, exposing 7 tools via JSON-RPC over stdio.

bash
unityassetdb mcp

Configuration

Add to your MCP client config file (e.g. claude_desktop_config.json):

json
{
  "mcpServers": {
    "unityassetdb": {
      "command": "/path/to/unityassetdb",
      "args": ["mcp"]
    }
  }
}

Available Tools

ToolDescription
index_buildBuild a fresh index for a Unity project
index_statusShow index statistics
refsQuery reference graph (in/out, with filter)
lsList VFS entries
globGlob pattern search
grepContent search
readRead VFS entry content

Supported File Types

ExtensionKindParser
.unity, .sceneSceneUnity YAML
.prefabPrefabUnity YAML
.matMaterialUnity YAML
.assetScriptableObjectUnity YAML
.controller, .overrideControllerAnimatorUnity YAML
.animAnimationUnity YAML
.vfxVisual EffectUnity YAML
.csC# Scripttree-sitter
.asmdef, .asmrefAssembly DefinitionJSON
.shader, .hlslShaderText
.fbx, .png, .wav, ...BinaryHash only

Tech Stack

ComponentTechnologyWhy
LanguageRustZero-cost abstractions, memory safety, single binary
Databaserusqlite (bundled)Recursive CTE queries, WAL mode, zero-config
C# Parsertree-sitterIncremental parsing, AST extraction
YAML Parserserde_yamlUnity multi-document YAML support
Web Serveraxum + tokioAsync, type-safe routing
ParallelismrayonData-parallel file extraction
Graph UIvis.jsInteractive network visualization

Benchmarks

Measured on a real Unity project (URP + TextMeshPro, Apple Silicon MacBook):

Project SizeFilesIndex TimeThroughputDB Size
Test fixture10<0.1s—48 KB
Real project (Assets + PackageCache)12,96913.6s~950 files/s185 MB

Indexing covers Assets/, Packages/, ProjectSettings/ and Library/PackageCache/ (built-in package scripts resolve too). Includes indexing file bodies for grep/read.


Development

bash
cargo test      # Run all 32 tests
cargo clippy    # Lint
cargo fmt       # Format
cargo bench    # Benchmarks

Project Structure

src/
├── model/          # Data types (FileKind, AssetKind, EntityKind, EdgeKind)
├── discovery/      # File system scanning + .meta parsing
├── extract/         # Unity YAML + C# tree-sitter parsers
├── resolve/        # Entity graph construction + script binding
├── materialize/    # VFS projection
├── db/              # SQLite schema + connection management
├── query/           # refs, ls, glob, grep, read
├── cli/             # CLI + MCP command handlers
├── server/          # axum REST API
└── web/             # Embedded HTML/JS/CSS

tests/
├── fixtures/        # Minimal Unity test project
└── integration_test # 32 tests: unit + integration

Download

Pre-built binaries available on the Releases page:

PlatformDownload
macOS (Apple Silicon)unityassetdb-aarch64-apple-darwin.tar.gz
macOS (Intel)unityassetdb-x86_64-apple-darwin.tar.gz
Linux (x86_64)unityassetdb-x86_64-unknown-linux-gnu.tar.gz
Windows (x86_64)unityassetdb-x86_64-pc-windows-msvc.zip

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Star History

Star History Chart

License

MIT © 2026

Installatioun

TypingMind
{
  "mcpServers": {
    "unityassetdb": {
      "command": "unityassetdb",
      "args": [
        "mcp"
      ]
    }
  }
}

UnityAssetDB MCP mat verschiddene KI-Modeller benotzen

TypingMind verbĂ«nnt MCP-Tools um Niveau vum AarbechtsberĂ€ich. Soubal UnityAssetDB verbonnen ass, kĂ«nnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. DĂ«s MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dĂ«s Optioun, wann den MCP-Server ZougrĂ«ff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „DĂ«sen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „DĂ«sen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „DĂ«sen Apparat“, kopĂ©iert de Befeel aus TypingMind a fĂ©iert en am Terminal aus. Loosst de Prozess lafen, wĂ€rend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. BestÀtegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wÀrend Dir MCP-Tools benotzt.
3

UnityAssetDB als Server derbÀisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren Ă€nneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren Ă€nneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu UnityAssetDB an.
  4. SpÀichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem KnĂ€ppchen „Serveren Ă€nneren“
{
  "mcpServers": {
    "unityassetdb": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

SpĂ€ichert d'ServerlĂ«scht, maacht „Plugins“ op an aktivĂ©iert d'MCP-Tools vu UnityAssetDB. Wielt dann e belibegen Ă«nnerstĂ«tzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'SĂ€it „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu UnityAssetDB.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat UnityAssetDB?
UnityAssetDB
Jo. Ech hunn et gelies.
Dat hunn ech mat UnityAssetDB fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server UnityAssetDB benotzt?

UnityAssetDB ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kĂ«nnt Dir dĂ«se MCP-Server eemol derbĂ€isetzen a seng Tools an Ärem KI-AarbechtsberĂ€ich zur VerfĂŒgung stellen.

Kann ech UnityAssetDB MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum AarbechtsberÀich. Sou kënnt Dir UnityAssetDB mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat UnityAssetDB MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte BenotzeruewerflĂ€che fir LLM-Chat, well et mĂ©i KI-Modeller, Prompts, Plugins, KI-Agenten, API-SchlĂ«sselen a MCP-Tools an engem AarbechtsberĂ€ich zesummebrĂ©ngt. Wann UnityAssetDB verbonnen ass, kĂ«nnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a glĂ€ichzĂ€iteg Är Chataarbecht an TypingMind organisĂ©ieren.

Wéi verbannen ech UnityAssetDB MCP mat TypingMind?

UnityAssetDB leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server ZougrĂ«ff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

WĂ©i eng Tools stellt UnityAssetDB MCP an TypingMind zur VerfĂŒgung?

UnityAssetDB stellt MCP-Funktiounen zur VerfĂŒgung, dĂ©i Dir op der Plugins-SĂ€it vun TypingMind aktivĂ©iere kĂ«nnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir UnityAssetDB MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a lĂ©isst Iech d'Kontroll iwwer Är Modellubidder, API-SchlĂ«sselen, Prompts a MCP-Konfiguratioun. Wann UnityAssetDB eng AuthentifizĂ©ierung verlaangt, setzt dĂ©i nĂ©ideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbĂ€i, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

AbonnĂ©iert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukĂŒnfteg GewĂ«nnspiller informĂ©iert ze ginn 👇