Design Data Agent
Design Data Agent is a table parsing tool that converts TSV spreadsheet data into Unity Scriptable Objects with minimal setup. Define custom parsing methods and data transformations through JSON configuration, then execute batch imports directly from the editor window. Streamlines game data management workflows for developers working with spreadsheet-based design documents.
com.macacagames.designdataagent 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/designdataagent.git README Markdown
Copy this to your project's README.md
## Installation
Add **Design Data Agent** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/designdataagent.git
```
[](https://www.pkglnk.dev/pkg/designdataagent)Dependencies (2)
README
Design Data Agent
Design data agent is a table parse tool for unity3D. You can define parse method easily, and parse data to unity scriptable object.
Dependencies
Import the dependencies into your project.
- Onion Data Editor : https://github.com/MacacaGames/OnionDataEditor
Usage
- Import Design Data Agent in your unity.
- Create a table that format is
TSV. - Open window from menu :
Window/TableParseWindow. - Press
+button, and select theTSVtable. - Press
Executeto parse table data to target scriptable object.
Table Format
The . markers just use for format, please ignore them.
. |
. |
. |
. |
|---|---|---|---|
{TableDefine} |
{Executable01} |
{Executable02} |
{Executable03} |
. |
{Col01Define} |
{Col02Define} |
{Col03Define} |
ID |
{Col01Name} |
{Col02Name} |
{Col03Name} |
| ID | {NameForRead} | {NameForRead} | {NameForRead} |
| 1 | {Col01Data} | {Col02Data} | {Col03Data} |
| ... | ... | ... | ... |
| 999 | {Col01Data} | {Col02Data} | {Col03Data} |
TableDefine
{
"title": "DataTitleInEditorWindow",
"version": "1",
"defaultRoot": "Assets/.../TargetScriptableObject.asset",
"import": [],
"locationDefine": {
"executable":"0",
"define":"1",
"colName":"2",
"dataBegin":"4"
},
"data": {
"custumName01" : "data[0]"
}
}
title: Title display in editor window. It will help you to pick right table.version: Define the design data agent version. If version is too old to execute, parse window will tell you.defaultRoot: The target scriptable object asset path.import: If you have extension methods (IDesignDataAgentMethods), can import via the class name.locationDefine: Define all funcitonal row location, location start with zero.executable: Is this col will execute or not. True or false.define: The column define row.colName: The column name row. Some method need use column name to find column.dataBegin: The first data row.
data: You can define few data to replace some value in column define. Use data by{data.NAME}.
ColDefine
{
"methods": [ {
"if": [
{ "name": "IsNotEmpty" }
],
"do": [
{ "name": "string", "target": "{data.custumName01}.stringField" }
]
}
],
"onEnd": [ { ... } ]
}
Method Hooks
methods: Default method. It will execute every column cell.onStart: It will execute when table parse start.onEnd: It will execute when table parse end.
Method Types
There are few method types can use on if/do name.
Do :
int: Parse int and fill in target.float: Parse float and fill in target.bool: Parse bool and fill in target.string: Parse string and fill in target.object: Parse asset object and fill in target.Vector2: Parse vector2 and fill in target.Sprite: Parse sprite and fill in target.enum: Parse enum and fill in target.MethodForMethodCreateAsset: Create asset.SaveAssets: Save modified assets.Reset: Reset target feild.ClearArray: Clear target array.Print: Print log in console.Invoke: Invoke method from root object.SetRoot: Set root object.
If :
NotEmpty: If value is not empty, do method.IsEmpty: If value is empty, do method.IsEmptyString: If value is empty string, do method.IsNotEmptyString: If value is not empty string, do method.IsFirst: If value is the first in this column, do method.IsLast: If value is the last in this column, do method.IsExist: If the target asset exist, do method.IsNotExist: If the target asset doesn't exist, do method.IsTrue: If value is true, do method.IsFalse: If value is false, do method.IsEqual: If value equal target value, do method.IsNotEqual: If value doesn't equal target value, do method.
More Detail:
https://docs.google.com/spreadsheets/d/1LNIFus8uxP8Dh8NUDZGNPkYyIn05rna1rx1-T-751FI/edit?usp=sharing
No comments yet. Be the first!