Variant

Data variant and override subsystem for the Scriptable Factory system. Provides a mechanism for creating variations of FactorableData by selectively overriding fields marked with the [Overridable] attribute, without modifying the original source data.

Architecture

spinner

Data Flow

spinner

Key Concepts

Concept
Description

Source data

The base FactorableData record that all variants derive from

DataOverride

A collection of field overrides that, when applied, produce one variant

DataFieldOverride

A single field name + value pair that modifies one field via reflection

[Overridable]

Attribute marking which FactorableData fields can be overridden

Baking

Pre-computing variant data by applying all overrides to copies of source data

Custom overrider

Optional Type parameter on [Overridable] for specialized override logic

Quick Start

Marking fields as overridable

Using a custom overrider type

Classes

Class
Description

Field attribute marking data fields as override-eligible

Single field override — name + value, applied via reflection

Collection of field overrides that produces one data variant

Manages source data + list of overrides, bakes variant instances

See Also

Last updated