Skip to content
SheetForge

Types and defaults

Every type is self-describing. A reader sees what a column holds from the @type cell alone. This page lists each notation, the optional and default forms, and the rules for values.

Notation at a glance

In these notations, a tab is one table of your data, also called a sheet. See Terms.

NotationMeaning
int float bool stringBuilt-in scalars
Enum<DamageType>A C# enum
List<T>A list
RecordIdThis tab's key column
IntIdThis tab's secondary integer key
RecordId@EffectsA reference to a record in the Effects tab by its string key
IntId@EffectsA reference to a record in the Effects tab by its integer key
AssetRef@IconsA reference to an asset in the Addressables group Icons
AssetRef@Icons<Sprite>The same reference, restricted to one asset type
ResourceRef<Sprite>A reference to an asset under a Resources folder
DirectRef<Sprite>A reference to any asset in the project
LocRef@StringsA reference to a localization key in the localization sheet Strings
Color · AnimationCurve · GradientBuilt-in visual value types
Modifier (example)A plugin-registered custom cell type
Pair<T> (example)A plugin-registered wrapper type

Kinds and targets

<> and @ mean different things and coexist.

SymbolMeaning
<>Kind or wrapper: the built-in List, or a plugin MyWrapper<T>
@Target

For example, List<RecordId@Effects> is a list of references, and Pair<RecordId@Effects> packs two references. Both point into the Effects tab.

The integer key composes the same way. List<IntId@Effects> is a list of integer-key references.

Enums and lists

Enum

Enum<DamageType> names a C# enum. The enum is either defined in an enum sheet, which needs no code, or registered by a plugin (EnumRegistry).

Member names are validated. Typos get nearest-match suggestions.

To define an enum in a sheet, see Enum sheets.

List

A List<T> cell follows these rules:

  • The element separator is ;.
  • Elements are trimmed.
  • An empty element is an error.
  • An empty cell is an empty list.

Keys

NotationHoldsRecommended column name
RecordIdA string self-identifier, for example item.swordcodeName
IntIdAn integer, for runtime, save and backend idsid

Both are always a required scalar. A tab holds at most one IntId column.

A tab may key on RecordId, IntId, or both. For the uniqueness rules, see Keys and uniqueness.

Record references

By string key

RecordId@Effects is integrity-validated:

  • The target tab exists.
  • The target tab has a key column.
  • The id resolves. Typos get suggestions.

By integer key

IntId@Effects has full parity with RecordId@Effects. It is integrity-validated the same way:

  • The target tab exists.
  • The target tab has an IntId column.
  • The id resolves. A miss gets a nearest-integer suggestion.

Values are canonicalized with int.ToString, so a hand-typed 007 resolves as 7.

Asset references

This section summarizes each notation. For the full rules, see Asset references.

AssetRef

AssetRef@Icons is existence-validated against the catalog.

A sub-asset is addressed as parent[sub], for example atlas[sword]. A sprite inside a texture and a material inside a font are sub-assets. This is the address Addressables gives it.

A sub-asset is validated, baked (SubObjectName) and exported by that key.

AssetRef with a type

With AssetRef@Icons<Sprite>, an address passes only when the asset, or one of its sub-assets, can be loaded as Sprite.

The name is any UnityEngine.Object-derived asset type the project knows, engine or your own. Write the short name when it matches exactly one type, or exactly one concrete type among several. Otherwise write the full name (MyGame.ItemData).

NotationResult
AssetRef@Icons<Sprite>Codegen emits AssetReferenceT<Sprite>
AssetRef@Icons without <…>Stays unrestricted
AssetRef<Sprite>@IconsRejected, with the correct spelling suggested

ResourceRef

A ResourceRef<Sprite> cell holds the path relative to the Resources folder, without its extension: Icons/gear_helm. It takes no @group, because the path already names the asset.

  • It is existence-validated against the project's Resources folders.
  • The <Type> restriction is optional and works as it does for AssetRef.
  • Codegen emits a ResourceRef<Sprite> struct that loads on demand.
  • It is usable in the Resources and scene catalogue delivery modes. A delivery mode is how baked databases reach the game.

DirectRef

A DirectRef<Sprite> cell holds the asset's Assets/… path or its 32-digit GUID. Both are always read. It takes no @group.

  • It is existence-validated against the project.
  • The <Type> restriction is optional.
  • Codegen emits the asset itself (Sprite), resolved at bake time, so it loads together with the database.
  • It is usable in every delivery mode.

Localization references

LocRef@Strings is integrity-validated like RecordId@Tab: existence, nearest-match suggestions, rename propagation, picker and dropdowns. The cell previews the entry's source-locale text inline.

  • The target tab must carry @loc. Otherwise the import reports LocRefTargetNotLocalizationSheet.
  • A bare LocRef without @Target is rejected.
  • List<LocRef@Strings> and LocRef@Strings? compose as usual.
  • Codegen emits a plain LocRef struct.

See Reference text from a data sheet.

Visual types

Color, AnimationCurve and Gradient each have a compact text form. The Data Studio and the web app edit that form with a native color, curve or gradient editor instead of raw text.

Codegen emits UnityEngine.Color / AnimationCurve / Gradient fields.

For the text forms, see Visual types.

Plugin types

Custom cell types

Modifier stands for a custom cell type that a plugin registers. The sample's stat:op:value mini-grammar is one.

CustomType@Target also works by registration alone. When the plugin implements IReferencingCellType, that column behaves exactly like RecordId@Target. It is validated, suggested, renamed, drawn and picked the same way.

To register one, see Add a custom cell type.

Wrapper types

A plugin can register a wrapper: a generic value shape MyWrapper<T> that packs several inner T values into one cell. For example, Pair<int> = 1~2.

The wrapper owns an outer syntax (delimiter, arity) and delegates the inner type to the Core. The inner type is resolved recursively, so Pair<RecordId@Effects>, Pair<Enum<DamageType>> and nested Box<Pair<int>> all work.

The wrapper composes with any inner type. Any references inside it are still validated, propagated on key rename, and rewritten on tab rename (full pass-through).

To register one, see Add a wrapper type.

Wrapper rejection rules

The rules are consistent with List.

NotationAllowedWhy
Pair<RecordId@Effects> · Pair<Enum<E>> · Box<Pair<int>>YesWrapper over a scalar, reference, enum, or another wrapper
List<Pair<int>>YesA list of composites
Pair<List<int>>NoA list may not sit inside a wrapper
Pair<int>@EffectsNoA wrapper is a value shape
Pair<int?> · Pair<int=1>NoOptionality and defaults are a field-level notation, not part of the inner type
  • In List<Pair<int>>, the wrapper's own delimiter must differ from ;, the list separator. That is a plugin-authoring responsibility.
  • Pair<List<int>> is rejected because List stays flat and outermost. This is the same rule as List<List<T>>.
  • Instead of Pair<int>@Effects, put the @ on the inner leaf: Pair<RecordId@Effects>.

Required, optional and default

NotationAn empty cell
float (unmarked)Is an error. The column is required
float?Materializes the type default (0), flagged IsDefaulted
int=1Materializes the explicit default 1
RecordId@Effects?Materializes an empty reference, flagged IsDefaulted
RecordId@Effects=Does the same as the bare ?
List<T>Is always allowed, as an empty list

An unmarked column is required, so an empty cell is reported when the sheet is parsed. It cannot silently become a value.

Optional values

? applies to the four scalars (int / float / bool / string) and to the three visual types. The visual types have these type defaults:

  • Color? → transparent black #00000000
  • AnimationCurve? → a curve with no keys
  • Gradient? → the white gradient #FFFFFF@0,#FFFFFF@1|1@0,1@1|Blend

Optional references

These notations make a reference optional:

  • RecordId@Effects?
  • IntId@Effects?
  • AssetRef@Icons?
  • ResourceRef<Sprite>?
  • DirectRef<Sprite>?

An empty cell materializes an empty reference. It points at nothing, with the target tab or group preserved and the cell flagged IsDefaulted.

An empty reference is not a broken reference:

  • Reference-integrity and asset-key validation skip it.
  • The record canvas draws no wire for it.
  • @overlap does not count two empty references as duplicates.

A cell that does carry a value is validated as usual, so a typo in an optional column is still caught.

Empty explicit default

RecordId@Effects= is the same thing written explicitly. An empty explicit default is equivalent to the bare ?.

A non-empty default, such as RecordId@Effects=fire, still resolves and is still integrity-checked.

Types that reject ?

Where ? is not accepted, the reason is always the same. The Core cannot invent a value out of nothing, so those types need an explicit =default. That covers:

  • Enum<T>?
  • A plugin custom type: Modifier?, including Modifier@Tab?
  • A wrapper: Pair<int>?

The key columns are excluded for a different reason: an empty key would breed duplicates. So an optional key column, RecordId? or IntId?, is rejected too.

Other rejected notations

These notations are rejected deliberately.

NotationWhy
int?=1 · RecordId@Effects?=fire? and = both say "optional", so pick one
List<T>?A list already allows empty
List<List<T>>No nested lists
Pair<int?>Optionality is field-level, not part of an inner type

Value rules

ValueRule
booltrue / false only. Case-insensitive on input. The canonical form is lowercase
NumbersAlways . as the decimal separator, independent of locale
Markers and enumsComparisons are Ordinal, so there are no locale surprises

Comma decimals, NaN and Infinity are rejected when the cell is parsed.

Float round-trip

Export renders the shortest round-trip format, so 1.0 may come back as 1. The value is preserved exactly. This is a semantic round-trip.

Next steps