Import settings
An import settings asset tells SheetForge where the sheets come from and where the output goes. This page covers creating the asset, working with several, every field, and the Google service-account key.
Create a settings asset
Press New settings asset in the Getting Started window, or use the Add workbook section of the Data Studio sidebar. Both open the same form: a name, a source and that source's folder, file or spreadsheet. Create writes the settings asset at Assets/{name}/{name}.asset, makes it active, and starts its first import when the source already holds sheets. You can also right-click in the Project window and choose Create ▸ SheetForge ▸ Import Settings.
Menu labels follow your language setting. See UI language.
With a single settings asset, your first import selects it automatically. No explicit choice is needed.
Keep several settings assets
You can keep several settings assets, for example one per Google sheet. Each settings asset is one workbook. Tick the ones you are working on. Those are the active workbooks.
Import runs over every active workbook. The Data Studio shows one of them, the open workbook, or all of them together, as you prefer.
You tick workbooks in the Getting Started window, in the workbook menu of the Data Studio toolbar, or in each asset's inspector. The choice is per project and per user, so it never reaches version control. The active set describes all three places.
Sheets in one workbook may reference tabs in another. See Reference notation.
Settings fields
Select the SheetForgeSettings asset in the Project window. The Inspector shows these fields. The name in parentheses is the field's name in code.
| Field | Meaning |
|---|---|
| Active — imported by Import | Whether this workbook is in the active set |
| Editor Language | The product UI language. A per-user setting, not stored in the asset |
Source Mode (sourceProviderId) | Where the sheets come from |
Local Folder Path (localFolderPath) | Local files: the folder containing sheet files |
Spreadsheet ID (spreadsheetId) | Google Sheet: the target spreadsheet ID |
Access Mode (googleAccessMode) | Google Sheet: SheetsApi or ExportUrl |
Gid Map (gidMap) | Google Sheet in ExportUrl mode: each tab's #gid= value. See The gid map |
Asset delivery (assetDeliveryId) | How baked databases reach the game |
Bake Output Folder (bakeOutputFolder) | Where baked Database SOs go. Default Assets/SheetForgeBaked |
Generated Code Folder (generatedCodeFolder) | Where generated .cs files go. Default Assets/SheetForgeGenerated |
Generated Namespace (generatedNamespace) | Namespace for generated types. Empty = SheetForge.Generated |
Export Folder Path (exportFolderPath) | Export destination |
Export Format (exportFormat) | Export format |
DirectRef cells as GUIDs (directRefWritesGuid) | How a newly filled DirectRef cell is written. Off by default |
The inspector shows only the fields that the current source needs. Local mode hides the Google fields, and Gid Map appears only in ExportUrl mode. The service-account key path is not a field of the asset. See Where the key path is stored.
The Workflow section at the bottom holds the Data Studio, Run Import and Run Export buttons.
Source
The Source Mode dropdown offers two built-in sources. Local files (TSV · CSV · xlsx) reads a folder of .tsv, .csv or .xlsx files. Google Sheet reads a Google spreadsheet. Both are complete production paths.
Custom plugin sources, such as a database or a REST service, appear here too if registered.
The value is stored in sourceProviderId, as LocalFile or GoogleSheet. When it is empty, the built-in LocalFile provider is the default.
Source location
In LocalFile mode, Local Folder Path is the folder containing sheet files. Only the folder's immediate children are scanned.
In GoogleSheet mode, Spreadsheet ID is the target spreadsheet ID. When Access Mode is SheetsApi, the source requires service-account auth. See Keep the service-account key safe.
Asset delivery
The Asset delivery dropdown offers Addressables (recommended), Resources folder and Scene catalogue (no Addressables, no Resources), plus any mode a plugin registered. The value is stored in assetDeliveryId. When it is empty, the mode is Addressables.
Workbooks may differ from each other. Each workbook's generated registration names the tabs it delivers, and the runtime routes every load by tab name. To compare the modes, see Choose a delivery mode.
Bake folder in the Resources mode
In the Resources mode, the Bake Output Folder field (bakeOutputFolder) is drawn as Resources folder. Its value must be a folder named Resources itself.
- The folder may sit at any depth under
Assets/. - The folder cannot sit under an
Editorfolder. - A folder merely below a
Resourcesfolder does not work, because it bakes to a different lookup path than the key.
The Resources loader hands "SheetForge/{tab}" to Resources.Load, so each tab is baked to {folder}/SheetForge/{tab}.asset. The part below the Resources folder is the key the runtime asks for.
| Folder when you choose the Resources mode | What SheetForge does |
|---|---|
| Still the default | Moves it to Assets/Resources for you. One console line says so |
| A folder you chose yourself | The field reports BakeOutputFolderNotUnderResources and shows a Use … button |
That button names the folder that would work. That is the innermost Resources folder above your value, or Assets/Resources.
The rule runs the other way too. In the Addressables and scene catalogue modes, a folder that is, or sits below, a Resources folder gets the same warning, because the engine would ship a second copy of everything baked there. The warning offers Assets/SheetForgeBaked.
DirectRef cells as GUIDs
DirectRef cells as GUIDs (directRefWritesGuid) decides whether a newly filled DirectRef cell is written as a 32-character asset GUID instead of an Assets/ path.
A GUID survives moving or renaming the asset. A path is readable in the sheet. Cells that already hold a value keep their spelling.
Generated code folder
Generated Code Folder (generatedCodeFolder) is where generated .cs files go. The default, Assets/SheetForgeGenerated, is deliberately outside Assets/SheetForge, so reinstalling or moving the product never deletes your generated code.
A project that already generates into the older in-product location (Assets/SheetForge/Runtime/Generated) keeps that location until it is empty. What the deletion touches covers moving.
Any folder works. If generated code references plugin types that the folder's assembly cannot see, import automatically emits a companion .asmdef there to wire the references. The core runtime assembly stays clean.
This folder is only the home for new tabs. A tab whose generated type already exists elsewhere, such as in a plugin package's committed Generated folder, is regenerated in place at its existing location. Stale duplicates are cleaned up automatically with a console log.
Generated namespace
Generated Namespace (generatedNamespace) is the namespace for generated types. Empty means SheetForge.Generated.
Set a unique namespace, such as MyGame.Data, to isolate your generated types from other packages and the bundled example.
Export folder and format
Export Folder Path (exportFolderPath) and Export Format (exportFormat) set the export destination and format. The formats are Tsv, Csv, Xlsx, MatchSource and Json. See Formats.
Keep the service-account key safe
This section applies to the Google source. If you use a LocalFile source, skip it.
Using Google Sheets in SheetsApi mode requires a service-account JSON key. If you have never created one, Google Sheets setup walks through the whole process step by step.
Keep this key outside Assets/ and outside your repository. Never commit it. A key file under Assets/ would leak into builds and commits.
Where the key path is stored
The path never lives in the settings asset. That asset is shared with your team. A key path written into it records where credentials sit on one person's disk, and it is wrong on everyone else's.
The key path is a per-user setting instead, stored in your editor preferences.
Set the key path
The recommended way is the environment variable SHEETFORGE_SHEETS_KEY. Set it to the absolute path of your key file. It takes precedence over every preference value, so a build machine injects its own key without anyone touching the project.
Otherwise open ⚙ Settings in the Data Studio toolbar and fill in the key path in its Service Account Key Path section. You can set one path for the project. When a project has several settings assets, you can also set a separate path for the open workbook.
Point either path outside the repo, for example C:/keys/service-account.json.
Next steps
- Getting started
Run the first import with the asset you configured.
- Sources, export and push
Google source details, export and push.
- Google Sheets setup
Create a service-account key step by step.
- Several workbooks
Work with more than one settings asset.