C# ScriptableObject Class Generator
The Class Generator helps developers generate compile-ready C# ScriptableObject scripts from spreadsheet columns in one click.
The Workflow
Instead of writing C# classes manually, open the wizard via Tools > DataLoom > SO Class Generator:
- Load Source File: Browse and select your CSV or TSV file.
- Configure Fields: DataLoom reads the header row and guesses the variable type based on column naming conventions (e.g. headers containing “color” map to type
Color, “damage” maps toint). - Customize Mappings: Manually adjust variable names and data types (e.g.
string,int,float,Vector3,string[], etc.) from the dropdowns. - Generate C# Class: Enter a class name (e.g.
ItemData) and a target output folder, then click Generate C# ScriptableObject Class.
Output Attributes (Aliases)
If a spreadsheet header is formatted as "Item Description" (with spaces), the generator:
- Sanitizes the C# field name to
itemDescription. - Attaches the
[DataLoomField("Item Description")]attribute alias above the field in the code so the importer knows how to match it.