# razviar/assetstudio architecture

> Architecture diagram of the GitHub repository razviar/assetstudio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/razviar/assetstudio
- Repository: https://github.com/razviar/assetstudio

## Overview

AssetStudio extracts Unity assets from files and bundles, then lets users inspect and export them through GUI or CLI workflows. The principal path is input selection, game/version and format handling, asset loading and deserialization, then filtering and export or map generation. The graph also preserves documented parallel loading/export, model and animation conversion, and optional FBX output. Relationships among sampled modules are grounded in the SOURCE INDEX; broader workflow links are based on README statements, so unsampled implementation details are not expanded.

Main entry points: [`AssetStudio.CLI/Program.cs`](https://github.com/razviar/assetstudio/blob/main/AssetStudio.CLI/Program.cs) (CLI workflow), [`AssetStudio.Utility/ModelExporter.cs`](https://github.com/razviar/assetstudio/blob/main/AssetStudio.Utility/ModelExporter.cs) (Asset export), [`AssetStudio/AssetsManager.cs`](https://github.com/razviar/assetstudio/blob/main/AssetStudio/AssetsManager.cs) (Asset loading), [`AssetStudio/ObjectReader.cs`](https://github.com/razviar/assetstudio/blob/main/AssetStudio/ObjectReader.cs) (Object reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_gui["GUI workflow<br/>[MainForm.cs]"]
  node_cli["CLI workflow<br/>[Program.cs]"]
  node_cli_options["CLI options<br/>[CommandLine.cs]"]
end

subgraph group_loading["Input and loading"]
  node_asset_loader["Asset loading<br/>[AssetsManager.cs]"]
  node_file_readers["Container readers"]
  node_serialized["Serialized files<br/>[SerializedFile.cs]"]
  node_object_reader["Object reader<br/>[ObjectReader.cs]"]
end

subgraph group_assets["Asset model"]
  node_asset_objects["Unity asset types"]
  node_animation["Animation assets<br/>[AnimationClip.cs]"]
  node_anim_controller["Animator controllers"]
  node_object_links["Asset references<br/>[PPtr.cs]"]
  node_asset_maps["Asset maps<br/>[AssetMap.cs]"]
end

subgraph group_export["Conversion and export"]
  node_asset_export["Asset export<br/>[ModelExporter.cs]"]
  node_converters["Asset converters"]
  node_yaml["YAML export<br/>[YAMLMappingNode.cs]"]
  node_model_convert["Model conversion<br/>[ModelConverter.cs]"]
  node_fbx["FBX export"]
end

subgraph group_support["Game and support"]
  node_game_config["Game/version config<br/>[GameManager.cs]"]
  node_asset_index["Asset index"]
  node_unitycn["UnityCN handling<br/>[UnityCNManager.cs]"]
  node_logger["Logging<br/>[Logger.cs]"]
end

node_user(("User"))
node_game_files["Unity files"]
node_output["Exported files"]

node_user -->|"uses"| node_gui
node_user -->|"runs"| node_cli
node_game_files -->|"loads"| node_asset_loader
node_cli -->|"parses options"| node_cli_options
node_cli -->|"loads assets"| node_asset_loader
node_gui -->|"loads assets"| node_asset_loader
node_cli -->|"configures game"| node_game_config
node_cli -->|"configures"| node_unitycn
node_cli -->|"uses index"| node_asset_index
node_asset_loader -->|"reads containers"| node_file_readers
node_asset_loader -->|"opens serialized files"| node_serialized
node_serialized -->|"creates readers"| node_object_reader
node_object_reader -->|"deserializes"| node_asset_objects
node_object_reader -->|"reads animation data"| node_animation
node_object_reader -->|"reads controller data"| node_anim_controller
node_anim_controller -->|"references clips"| node_animation
node_asset_objects -->|"resolves references"| node_object_links
node_cli -->|"builds maps"| node_asset_maps
node_cli -->|"exports assets"| node_asset_export
node_gui -->|"exports assets"| node_asset_export
node_asset_export -.->|"converts assets"| node_converters
node_asset_export -.->|"writes YAML"| node_yaml
node_asset_export -.->|"converts models"| node_model_convert
node_model_convert -->|"exports FBX"| node_fbx
node_asset_export -->|"writes exports"| node_output
node_asset_loader -->|"logs progress"| node_logger

click node_gui "https://github.com/razviar/assetstudio/blob/main/AssetStudio.GUI/MainForm.cs"
click node_cli "https://github.com/razviar/assetstudio/blob/main/AssetStudio.CLI/Program.cs"
click node_cli_options "https://github.com/razviar/assetstudio/blob/main/AssetStudio.CLI/Components/CommandLine.cs"
click node_asset_loader "https://github.com/razviar/assetstudio/blob/main/AssetStudio/AssetsManager.cs"
click node_file_readers "https://github.com/razviar/assetstudio/tree/main/AssetStudio"
click node_game_config "https://github.com/razviar/assetstudio/blob/main/AssetStudio/GameManager.cs"
click node_asset_index "https://github.com/razviar/assetstudio/blob/main/AssetStudio/AIVersionManager.cs"
click node_unitycn "https://github.com/razviar/assetstudio/blob/main/AssetStudio/UnityCNManager.cs"
click node_serialized "https://github.com/razviar/assetstudio/blob/main/AssetStudio/SerializedFile.cs"
click node_object_reader "https://github.com/razviar/assetstudio/blob/main/AssetStudio/ObjectReader.cs"
click node_asset_objects "https://github.com/razviar/assetstudio/tree/main/AssetStudio/Classes"
click node_animation "https://github.com/razviar/assetstudio/blob/main/AssetStudio/Classes/AnimationClip.cs"
click node_anim_controller "https://github.com/razviar/assetstudio/blob/main/AssetStudio/Classes/AnimatorController.cs"
click node_object_links "https://github.com/razviar/assetstudio/blob/main/AssetStudio/Classes/PPtr.cs"
click node_asset_maps "https://github.com/razviar/assetstudio/blob/main/AssetStudio/AssetMap.cs"
click node_asset_export "https://github.com/razviar/assetstudio/blob/main/AssetStudio.Utility/ModelExporter.cs"
click node_converters "https://github.com/razviar/assetstudio/tree/main/AssetStudio.Utility"
click node_yaml "https://github.com/razviar/assetstudio/blob/main/AssetStudio/YAML/Base/YAMLMappingNode.cs"
click node_model_convert "https://github.com/razviar/assetstudio/blob/main/AssetStudio.Utility/ModelConverter.cs"
click node_fbx "https://github.com/razviar/assetstudio/blob/main/AssetStudio.FBXWrapper/FbxExporterContext.cs"
click node_logger "https://github.com/razviar/assetstudio/blob/main/AssetStudio/Logger.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gui,node_cli,node_cli_options,node_user toneBlue
class node_asset_loader,node_file_readers,node_serialized,node_object_reader toneAmber
class node_asset_objects,node_animation,node_anim_controller,node_object_links,node_asset_maps toneMint
class node_asset_export,node_converters,node_yaml,node_model_convert,node_fbx toneRose
class node_game_config,node_asset_index,node_unitycn,node_logger,node_game_files,node_output toneIndigo
```

## Components

### User interfaces

- [GUI workflow](https://github.com/razviar/assetstudio/blob/main/AssetStudio.GUI/MainForm.cs): `AssetStudio.GUI/MainForm.cs`
- [CLI workflow](https://github.com/razviar/assetstudio/blob/main/AssetStudio.CLI/Program.cs): `AssetStudio.CLI/Program.cs`
- [CLI options](https://github.com/razviar/assetstudio/blob/main/AssetStudio.CLI/Components/CommandLine.cs): `AssetStudio.CLI/Components/CommandLine.cs`

### Input and loading

- [Asset loading](https://github.com/razviar/assetstudio/blob/main/AssetStudio/AssetsManager.cs): `AssetStudio/AssetsManager.cs`
- [Container readers](https://github.com/razviar/assetstudio/tree/main/AssetStudio): `AssetStudio`
- [Serialized files](https://github.com/razviar/assetstudio/blob/main/AssetStudio/SerializedFile.cs): `AssetStudio/SerializedFile.cs`
- [Object reader](https://github.com/razviar/assetstudio/blob/main/AssetStudio/ObjectReader.cs): `AssetStudio/ObjectReader.cs`

### Asset model

- [Unity asset types](https://github.com/razviar/assetstudio/tree/main/AssetStudio/Classes): `AssetStudio/Classes`
- [Animation assets](https://github.com/razviar/assetstudio/blob/main/AssetStudio/Classes/AnimationClip.cs): `AssetStudio/Classes/AnimationClip.cs`
- [Animator controllers](https://github.com/razviar/assetstudio/blob/main/AssetStudio/Classes/AnimatorController.cs): `AssetStudio/Classes/AnimatorController.cs`
- [Asset references](https://github.com/razviar/assetstudio/blob/main/AssetStudio/Classes/PPtr.cs): `AssetStudio/Classes/PPtr.cs`
- [Asset maps](https://github.com/razviar/assetstudio/blob/main/AssetStudio/AssetMap.cs): `AssetStudio/AssetMap.cs`

### Conversion and export

- [Asset export](https://github.com/razviar/assetstudio/blob/main/AssetStudio.Utility/ModelExporter.cs): `AssetStudio.Utility/ModelExporter.cs`
- [Asset converters](https://github.com/razviar/assetstudio/tree/main/AssetStudio.Utility): `AssetStudio.Utility`
- [YAML export](https://github.com/razviar/assetstudio/blob/main/AssetStudio/YAML/Base/YAMLMappingNode.cs): `AssetStudio/YAML/Base/YAMLMappingNode.cs`
- [Model conversion](https://github.com/razviar/assetstudio/blob/main/AssetStudio.Utility/ModelConverter.cs): `AssetStudio.Utility/ModelConverter.cs`
- [FBX export](https://github.com/razviar/assetstudio/blob/main/AssetStudio.FBXWrapper/FbxExporterContext.cs): `AssetStudio.FBXWrapper/FbxExporterContext.cs`

### Game and support

- [Game/version config](https://github.com/razviar/assetstudio/blob/main/AssetStudio/GameManager.cs): `AssetStudio/GameManager.cs`
- [Asset index](https://github.com/razviar/assetstudio/blob/main/AssetStudio/AIVersionManager.cs): `AssetStudio/AIVersionManager.cs`
- [UnityCN handling](https://github.com/razviar/assetstudio/blob/main/AssetStudio/UnityCNManager.cs): `AssetStudio/UnityCNManager.cs`
- [Logging](https://github.com/razviar/assetstudio/blob/main/AssetStudio/Logger.cs): `AssetStudio/Logger.cs`

### Other components

- **User**
- **Unity files**
- **Exported files**

## Connections

- User → GUI workflow: uses (evidence: `README.md`)
- User → CLI workflow: runs (evidence: `README.md`)
- Unity files → Asset loading: loads (evidence: `README.md`)
- CLI workflow → CLI options: parses options (evidence: `AssetStudio.CLI/Program.cs`)
- CLI workflow → Asset loading: loads assets (evidence: `README.md`)
- GUI workflow → Asset loading: loads assets (evidence: `README.md`)
- CLI workflow → Game/version config: configures game (evidence: `AssetStudio.CLI/Program.cs`)
- CLI workflow → UnityCN handling: configures (evidence: `AssetStudio.CLI/Program.cs`)
- CLI workflow → Asset index: uses index
- Asset loading → Container readers: reads containers (evidence: `AssetStudio/AssetsManager.cs`)
- Asset loading → Serialized files: opens serialized files (evidence: `AssetStudio/AssetsManager.cs`)
- Serialized files → Object reader: creates readers (evidence: `AssetStudio/ObjectReader.cs`)
- Object reader → Unity asset types: deserializes (evidence: `AssetStudio/ObjectReader.cs`)
- Object reader → Animation assets: reads animation data (evidence: `AssetStudio/Classes/AnimationClip.cs`)
- Object reader → Animator controllers: reads controller data (evidence: `AssetStudio/Classes/AnimatorController.cs`)
- Animator controllers → Animation assets: references clips (evidence: `AssetStudio/Classes/AnimatorController.cs`)
- Unity asset types → Asset references: resolves references (evidence: `AssetStudio/Classes/PPtr.cs`)
- CLI workflow → Asset maps: builds maps (evidence: `AssetStudio.CLI/Program.cs`)
- CLI workflow → Asset export: exports assets (evidence: `README.md`)
- GUI workflow → Asset export: exports assets (evidence: `README.md`)
- Asset export → Asset converters: converts assets
- Asset export → YAML export: writes YAML
- Asset export → Model conversion: converts models
- Model conversion → FBX export: exports FBX (evidence: `AssetStudio.FBXWrapper/FbxExporterContext.cs`)
- Asset export → Exported files: writes exports (evidence: `README.md`)
- Asset loading → Logging: logs progress (evidence: `AssetStudio/AssetsManager.cs`)
