Class TextModeColorAssetGenerator
Editor utility that writes the TextMode theme palettes to
Scylla.Core.Util.Palette.ColorPaletteAsset files inside the TextMode module's own Resources
folder, where they ship with the module.
Inherited Members
Namespace: Scylla.TextMode.Editor
Assembly: ScyllaTextMode.Editor.dll
Syntax
public static class TextModeColorAssetGenerator
Remarks
Re-running overwrites the assets with fresh data from TextModeColorPaletteDefaults, which is how a color change in code reaches the shipped assets. The assets are committed, so this normally runs only when a theme is edited.
Each palette is checked against HasRequiredEntries(ColorPalette)
before anything is written. A malformed palette is worth catching here, because
ColorPalette's constructor throws on a duplicate entry name and an asset that
trips it fails to load at all rather than degrading.
Fields
OUTPUT_DIRECTORY
Project-relative folder the theme palettes are written to. The trailing
Color/Palettes segments are what Scylla.Core.Util.Palette.ColorAssetRegistry scans for.
Declaration
public const string OUTPUT_DIRECTORY = "Assets/Scylla/Framework/TextMode/Resources/Color/Palettes"
Field Value
| Type | Description |
|---|---|
| string |
Methods
Generate()
Creates or refreshes the theme palette assets in OUTPUT_DIRECTORY
from the color tables in TextModeColorPaletteDefaults. Available from the
menu at Assets > Create > Scylla > TextMode > TextMode Color Palettes.
Declaration
[ScyllaMenuItem(ScyllaMenuGroup.Asset, "TextMode/TextMode Color Palettes")]
public static void Generate()
Remarks
A developer authoring a game never needs to run this: the module already ships with the assets in place. An asset already present at the target path is updated in place rather than replaced, so existing references to it survive the refresh.