# cotore-game/csv4unity architecture

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

- Interactive diagram: https://gitdiagram.com/cotore-game/csv4unity
- Repository: https://github.com/cotore-game/csv4unity

## Overview

CSV4Unity is a Unity CSV-reading package. Its principal workflow is an application loading a CSV asset into a table, then accessing a row and cell and converting that cell on demand. Separate documented capabilities include document-based access, search indexing, validation, and Editor inspection and encoding tools. The source excerpts were unavailable, so the graph uses README-documented relationships and omits unverified internal calls.

Main entry points: [`Assets/Plugins/CSVLoader/Runtime/CSVLoader.cs`](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CSVLoader.cs) (CSV loader), [`Assets/Plugins/CSVLoader/Runtime/Data/CsvRow.cs`](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Data/CsvRow.cs) (Row and cell views), [`Assets/Plugins/CSVLoader/Runtime/Data/CsvTable.cs`](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Data/CsvTable.cs) (Table and document views), [`Assets/Plugins/CSVLoader/Runtime/Conversion/CsvValueConverter.cs`](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Conversion/CsvValueConverter.cs) (Value converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime access"]
  node_loader["CSV loader<br/>[CSVLoader.cs]"]
  node_parser["CSV parser<br/>[CsvParser.cs]"]
  node_table["Table and document views<br/>[CsvTable.cs]"]
  node_row["Row and cell views<br/>[CsvRow.cs]"]
  node_converter["Value converter"]
  node_index["Search index<br/>[CsvIndex.cs]"]
end

subgraph group_validation["Validation"]
  node_validationrules["Validation rules"]
  node_validator["CSV validator<br/>[CsvValidator.cs]"]
  node_conditions["Conditional rules"]
end

subgraph group_editor["Editor tools"]
  node_editorvalidation["Manual validation UI"]
  node_viewer["CSV viewer<br/>[CsvViewerWindow.cs]"]
end

subgraph group_support["Schema and encoding"]
  node_schema["Schema discovery"]
  node_encoding["Encoding tools"]
end

node_developer(("Unity developer"))
node_csvasset["CSV asset"]
node_app["Unity application"]

node_developer -->|"uses"| node_app
node_csvasset -->|"assigns asset"| node_app
node_app -->|"loads table"| node_loader
node_loader -->|"returns table"| node_table
node_app -->|"accesses row"| node_row
node_row -->|"converts cell"| node_converter
node_developer -.->|"builds lookup"| node_index
node_developer -.->|"validates data"| node_validator
node_developer -->|"validates in Editor"| node_editorvalidation
node_developer -->|"uses schema discovery"| node_schema
node_developer -->|"inspects encoding"| node_encoding
node_developer -->|"views CSV"| node_viewer

click node_loader "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CSVLoader.cs"
click node_parser "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Parsing/CsvParser.cs"
click node_table "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Data/CsvTable.cs"
click node_row "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Data/CsvRow.cs"
click node_converter "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Conversion/CsvValueConverter.cs"
click node_index "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Indexing/CsvIndex.cs"
click node_validationrules "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvValidationAttributes.cs"
click node_validator "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvValidator.cs"
click node_conditions "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvConditionEvaluator.cs"
click node_schema "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Editor/CsvSchemaTypeDiscovery.cs"
click node_editorvalidation "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Editor/CsvInspectorEditor.cs"
click node_encoding "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Editor/CsvEncodingUtility.cs"
click node_viewer "https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Editor/CsvViewerWindow.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_loader,node_parser,node_table,node_row,node_converter,node_index toneBlue
class node_validationrules,node_validator,node_conditions toneAmber
class node_editorvalidation,node_viewer toneMint
class node_schema,node_encoding toneRose
class node_developer,node_csvasset,node_app toneIndigo
```

## Components

### Runtime access

- [CSV loader](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CSVLoader.cs): `Assets/Plugins/CSVLoader/Runtime/CSVLoader.cs`
- [CSV parser](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Parsing/CsvParser.cs): `Assets/Plugins/CSVLoader/Runtime/Parsing/CsvParser.cs`
- [Table and document views](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Data/CsvTable.cs): `Assets/Plugins/CSVLoader/Runtime/Data/CsvTable.cs`
- [Row and cell views](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Data/CsvRow.cs): `Assets/Plugins/CSVLoader/Runtime/Data/CsvRow.cs`
- [Value converter](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Conversion/CsvValueConverter.cs): `Assets/Plugins/CSVLoader/Runtime/Conversion/CsvValueConverter.cs`
- [Search index](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/Indexing/CsvIndex.cs): `Assets/Plugins/CSVLoader/Runtime/Indexing/CsvIndex.cs`

### Validation

- [Validation rules](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvValidationAttributes.cs): `Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvValidationAttributes.cs`
- [CSV validator](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvValidator.cs): `Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvValidator.cs`
- [Conditional rules](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvConditionEvaluator.cs): `Assets/Plugins/CSVLoader/Runtime/CsvValidation/CsvConditionEvaluator.cs`

### Editor tools

- [Manual validation UI](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Editor/CsvInspectorEditor.cs): `Assets/Plugins/CSVLoader/Editor/CsvInspectorEditor.cs`
- [CSV viewer](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Editor/CsvViewerWindow.cs): `Assets/Plugins/CSVLoader/Editor/CsvViewerWindow.cs`

### Schema and encoding

- [Schema discovery](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Editor/CsvSchemaTypeDiscovery.cs): `Assets/Plugins/CSVLoader/Editor/CsvSchemaTypeDiscovery.cs`
- [Encoding tools](https://github.com/cotore-game/csv4unity/blob/main/Assets/Plugins/CSVLoader/Editor/CsvEncodingUtility.cs): `Assets/Plugins/CSVLoader/Editor/CsvEncodingUtility.cs`

### Other components

- **Unity developer**
- **CSV asset**
- **Unity application**

## Connections

- Unity developer → Unity application: uses (evidence: `README.md`)
- CSV asset → Unity application: assigns asset (evidence: `README.md`)
- Unity application → CSV loader: loads table (evidence: `README.md`)
- CSV loader → Table and document views: returns table (evidence: `README.md`)
- Unity application → Row and cell views: accesses row (evidence: `README.md`)
- Row and cell views → Value converter: converts cell (evidence: `README.md`)
- Unity developer → Search index: builds lookup
- Unity developer → CSV validator: validates data
- Unity developer → Manual validation UI: validates in Editor (evidence: `README.md`)
- Unity developer → Schema discovery: uses schema discovery (evidence: `README.md`)
- Unity developer → Encoding tools: inspects encoding (evidence: `README.md`)
- Unity developer → CSV viewer: views CSV (evidence: `README.md`)
