CsvUtility View on Asset Store (opens in new tab)

Package details

Latest version
1.0
Last updated
First released
Unity version
6000.3.8 or later
Package size
82 KB
Files
8
Favorites
3
Views in the past week
6

Price tracking

Last checked
Tracked since
Lowest recorded
Free on

Keywords

CsvUtility

by PenguinGod (opens in new tab)

No ratings yet

CsvUtility is a lightweight Csv serializer and deserializer that mimics Unity's native JsonUtility syntax. It supports of primitives, enums, collections, and custom type extensions

Price Free

Get it free on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for CsvUtility, 6 months Current Free; lowest Free; highest Free in this period. $0 Jul Aug Sep Oct Nov

About this asset

CsvUtility is designed to solve the cumbersome and repetitive workflow of handling CSV tables in Unity. With a clean 1-line API syntax mimicking JsonUtility, you can load and save data tables out-of-the-box. 

Key Architecture & Advantages:

1. Complete Primitive & Enum Support:

Natively parses all primitive types (byte, int, float, bool, string, etc.) and custom Enums. It features smart formatting such as automatic string trimming and case-insensitive enum parsing to guarantee crash-free runtimes.

2. Dynamic 1-Element-1-Cell Collection Parsing:

Arrays, Lists, and Dictionaries are completely supported. CsvUtility automatically calculates the maximum length of your collections and expands CSV columns dynamically (1 Element = 1 Column mapping). It safely handles missing data with padding commas (,,) to prevent table-shifting bugs.

3. Deep Nested Classes & Structs:

Supports deep nesting of serializable custom classes and structs. Field scopes are safely preserved with structured header mapping.

[How to Use - Quick Sample]

// Load Data

MyData[] loadDatas = CsvUtility.CsvToArray<MyData>(csvTextAsset.text);

// Save Data

string csvResult = CsvUtility.ArrayToCsv(loadDatas);

From the publisher's Asset Store listing.

Technical details

Features & Technical Specifications:

- High-performance Reflection-based mapping workflow.

- 1-Line API: CsvUtility.CsvToArray<T>(), CsvUtility.ArrayToCsv<T>() matching JsonUtility patterns.

- Robust Error Handling: Automatic fallback to default values (Activator.CreateInstance) when encountering empty cell paddings or corrupted format cells.

- Advanced Custom Extensions: Open architecture via the 'ICsvConvertor' interface. Developers can easily inject custom parsing rules for unsupported structures or third-party types.

- Built-in Converters: Includes a native 'UnityColor32Convertor' inside the package to parse Color32 types immediately out-of-the-box.

- Completely independent C# utility code with zero third-party dependencies, functioning perfectly across all Graphic Rendering Pipelines (Built-in, URP, HDRP).

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
6000.3.8f1 Compatible Compatible Compatible Compatible

As listed on the Asset Store.