Logo van UnityAssetDB

UnityAssetDB

Organisatie
song-chaoyang

🗄️ Every Unity asset reference in one queryable database. Rust + SQLite + tree-sitter. CLI + Web UI + MCP server.

Uitgeversong-chaoyang
RepositoryUnityAssetDB
TaalRust
Forks
5
Sterren
63
Beschikbare tools
0
Transporttypestdio
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    UnityAssetDB biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    63 sterren en 5 forks in de gekoppelde 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

Installatie

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

Gebruik UnityAssetDB MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra UnityAssetDB is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg UnityAssetDB toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van UnityAssetDB.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "unityassetdb": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van UnityAssetDB in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van UnityAssetDB in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je UnityAssetDB gebruiken om me hiermee te helpen?
UnityAssetDB
Zeker. Ik heb het gelezen.
Dit vond ik met UnityAssetDB.

Veelgestelde vragen

Waarvoor wordt de MCP-server UnityAssetDB gebruikt?

UnityAssetDB is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik UnityAssetDB MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je UnityAssetDB gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom UnityAssetDB MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als UnityAssetDB verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik UnityAssetDB MCP met TypingMind?

UnityAssetDB werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt UnityAssetDB MCP in TypingMind?

UnityAssetDB biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om UnityAssetDB MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als UnityAssetDB authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇