Quick Start: Import Your First Excel Spreadsheet
This guide walks you through importing a basic Excel workbook (.xlsx) containing nested stats and list modifiers into Unity ScriptableObjects.
Step 1: Create the C# ScriptableObject
Create a new C# script named HeroData.cs inside your assets folder:
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class SkillMetrics
{
public float cooldown;
public float energyCost;
}
[CreateAssetMenu(fileName = "NewHero", menuName = "Data/Hero")]
public class HeroData : ScriptableObject
{
public string id;
public string heroName;
public List<int> startingAttributes; // List mapping
public SkillMetrics primarySkill; // Nested structure mapping
}
Step 2: Prepare the Excel Sheet
Create an Excel workbook named Heroes.xlsx with the following columns:
| id | heroName | startingAttributes | primarySkill |
|---|---|---|---|
| hero_mage | Jaina | 10;30;20 | {"cooldown":8.5,"energyCost":50} |
| hero_warrior | Garrosh | 30;10;15 | {"cooldown":12.0,"energyCost":25} |
Step 3: Configure the Control Panel
- Open the dashboard via Tools > DataLoom Pro > Control Panel.
- Drag & Drop your
Heroes.xlsxfile directly into the input drop area. - Under 2. Mapping & Output Settings:
- Set Target ScriptableObject C# Type to
HeroData. - Set Key Identifier Column Name to
id. - Set Output Save Folder Path to
Assets/Heroes.
- Set Target ScriptableObject C# Type to
- Under 3. Advanced Automation Tools (Pro):
- Check Enable Live File Sync (Auto-Watch).
- Click Generate ScriptableObjects.
Results
Look at your Project window under Assets/Heroes/. You will find two newly generated ScriptableObject assets:
hero_mage.assethero_warrior.asset
Select any asset to inspect its parameters. The attributes list and the nested primary skill specs are fully populated!
Live Editing
Open your Heroes.xlsx file in Excel or Google Sheets, change Jaina’s name or cooldown, and hit Save. Look back at the Unity Editor: the changes are immediately imported, updating your ScriptableObjects in real-time.