Namespace Scylla.TextMode
Classes
ANSIAttributeParser
Splits a line of text that carries ANSI style markup into the plain characters to display and the attribute runs that describe how to display them.
ANSIColor
Provides ANSI terminal color palette definitions and conversion utilities. Supports the standard 16-color ANSI palette (backed by a Scylla.Core.Util.Palette.ColorPalette), the 256-color extended palette (16 ANSI + 216 color cube + 24 grayscale), and 24-bit truecolor.
The active 16-color palette can be swapped via SetPalette(ColorPalette) to use any Scylla.Core.Util.Palette.ColorPalette with at least 16 entries (e.g. CGA, C64). The 256-color extension (color cube + grayscale ramp) is automatically rebuilt when the palette changes.
ANSISGRAttributes
Maps the style parameters of an ANSI SGR (Select Graphic Rendition) sequence onto CellAttributes flags.
AmbientEffectBase
Base class for effects that decorate whatever is already on screen and keep going, rather than moving a region from one state to another and finishing.
BoxStyleCharacters
Provides the box drawing character codepoints for each BoxStyle.
CRTSettings
Project defaults for the CRT display simulation.
CellAttributesExtensions
Extension methods for CellAttributes manipulation.
CellBuffer
A detached copy of a rectangular block of cells, used by effects that need to remember what a region looked like before they started writing to it.
CellBufferRenderer
Manages the GPU-side rendering pipeline for a text mode cell grid. Maintains a UnityEngine.GraphicsBuffer containing Cell data and renders the grid using instanced quad rendering via RenderMeshIndirect(in RenderParams, Mesh, GraphicsBuffer, int, int). Supports partial buffer updates to minimize GPU transfer costs.
CellGrid
CPU-side grid manager for text mode cells. Stores a flat row-major array of Cell structs and tracks dirty regions for efficient partial GPU upload via CellBufferRenderer.
ColorCycleEffect
Runs a region's text through a color gradient over time.
ColorCycleEffectPreset
An authored color cycle look: which gradient the text runs through.
CrossFadeEffect
Dissolves a region from one screen into another by blending colors rather than by swapping cells in an order.
DecodeEffect
Resolves a region out of scrambled characters, the way decryption is shown in films: each cell cycles through random glyphs before settling on the character it is meant to hold.
DecodeEffectPreset
An authored decode look: which characters the scramble cycles through and how fast.
DigitalRainEffect
Runs a column of falling characters down each column of the region, leaving the new screen behind as it passes.
DigitalRainEffectPreset
An authored digital rain look: the characters that fall, how long their trails are, and how bright the leading character is.
EffectsSettings
Settings for the animated text effects system.
FadeEffect
Fades a region's existing content in from a flat color, or out to one.
FadeEffectPreset
An authored fade look: which color the content fades from, and in which direction.
FlickerEffect
Dips a region's brightness at irregular intervals, the way a tired display does.
FlickerEffectPreset
An authored flicker look: how often the display dips and how far.
GlitchEffect
Corrupts a region intermittently: rows torn sideways, cells replaced with the wrong character, patches of inverted video.
GlitchEffectPreset
An authored glitch look: how bad the damage gets, how often it happens, and which kinds of damage are used.
GlyphAtlasCache
Reads a TMPro.TMP_FontAsset and caches pre-packed glyph UV coordinates and metrics for efficient Cell stamping. When a cell's codepoint changes, the cache provides the atlas UV and metrics data without dictionary lookups on the GPU.
v0.1.0 Limitation: Only the primary atlas page (index 0) is used for rendering.
The AtlasIndex is stored per glyph for future multi-atlas
support, but the shader currently binds a single _FontAtlas texture. Fonts with
glyphs that overflow to additional atlas pages will render those glyphs with incorrect UVs.
Use font assets with sufficient atlas resolution to keep all needed glyphs on a single page.
GridSettings
Settings for the default grid layout. Grid dimensions are auto-computed from font size and available space.
InputHistory
Default ring-buffer based implementation of IInputHistory. Stores input entries in a Scylla.Core.Structures.ScyllaRingBuffer<T> and supports up/down navigation through the history. Consecutive duplicate entries are skipped when adding.
MaskTransitionEffect
Swaps a region over to a new screen cell by cell, in the order a CellMask decides.
PulseEffect
Breathes a region's brightness up and down without changing anything it says.
PulseEffectPreset
An authored pulse look: how far the brightness travels and whether backgrounds move with it.
PushEffect
Moves a region from one screen to another by sliding them past each other.
PushEffectPreset
An authored push look: which edge the new screen enters from and how the two screens move relative to each other.
SDFSettings
Settings for SDF text rendering quality.
ScyllaTextMode
TextMode module for the Scylla Framework. Provides grid-based SDF text rendering for terminal emulation and text-based games. Manages a fixed grid of character cells where each cell has a Unicode character, foreground/background colors, and style attributes.
ScyllaTextModeConfiguration
Configuration asset for the Scylla TextMode module. Provides settings for grid layout, SDF rendering, and terminal emulation.
SlideInEffect
Slides a region's content in from one edge, as though it were being pushed into place.
SlideInEffectPreset
An authored slide look: which edge the content enters from and what fills the space behind it.
StaticTuneInEffect
Fills the region with churning static and lets the new screen resolve out of it, the way an old set finds a signal.
StaticTuneInEffectPreset
An authored tune in look: what the static is made of, what color it is, and how fast it churns.
TerminalCLI
Grid-native CLI input handler for terminal displays. Renders the command prompt, user input text, and cursor directly into the bottom row(s) of a CellGrid. Processes keyboard input via UnityEngine.InputSystem.Keyboard.current for special keys and UnityEngine.InputSystem.Keyboard.onTextInput for character input. Has no dependency on the Scylla Input module.
TerminalEmulator
Terminal emulator that implements IVTParserHandler to translate VT/ANSI escape sequences into CellGrid state mutations. Supports cursor movement, SGR (Select Graphic Rendition), scroll regions, alternate screen buffer, cursor shapes (DECSCUSR), the DEC Special Graphics line-drawing character set, and standard DEC terminal modes.
TerminalGridRenderer
Renders the visible portion of a TerminalScrollbackBuffer into a CellGrid. Handles line wrapping (word, character, or none, per the active TextWrapMode), scroll offset calculation, and per-line foreground coloring. Each scrollback line is wrapped to fit within the grid width, producing one or more visual rows.
TerminalInputEncoder
Encodes Unity key events into terminal byte sequences suitable for feeding to a TerminalEmulator. Supports normal mode, application cursor keys mode, and modifier encoding.
TerminalScrollbackBuffer
Scrollback ring buffer for terminal displays. Stores text lines with their associated colors using Scylla.Core.Structures.ScyllaRingBuffer<T>. When the buffer reaches capacity, oldest entries are automatically overwritten.
TerminalSettings
Settings for terminal emulation behavior.
TextEffectBase
Base class for text effects. Owns the timing, the region, the lifecycle and the clamped write helpers, leaving subclasses to implement only what an effect actually draws.
TextEffectCompletedEvent
Event published when a text effect finishes, whether it ran to completion or was stopped early. Check WasCompleted to tell the two apart.
TextEffectExtensions
Chaining helpers for configuring text effects.
TextEffectPreset
An authored set of effect settings, saved as an asset so it can be tuned in the Inspector and reused wherever the same look is wanted.
TextEffectSequencer
Runs a list of effects one after another, with optional pauses and callbacks between them.
TextEffectStartedEvent
Event published when a text effect begins running. Game code can listen for this to start an accompanying sound or to disable input while the effect plays.
TextEffects
Creates configured text effects, ready to be handed to a view's effect player.
TextModeColorDefaults
TextMode-owned palette factory. Declares the entry names and semantic roles that make up a TextMode theme, resolves a theme by name through Scylla.Core.Util.Palette.ColorAssetRegistry, and carries the one hard-coded palette the module falls back to when nothing suitable is found.
TextModeConfigurationChangedEvent
Event published when the ScyllaTextMode configuration's live settings are applied, for example after an Inspector edit in Play Mode or the configuration's "Apply Now" button. TextMode views subscribe to this to re-adopt SDF rendering settings at runtime without a domain reload or scene restart.
TextModeConsole
High-level text operations API for a CellGrid. Provides convenient methods for printing text, drawing boxes, and filling regions with support for text wrapping, alignment, and background blending.
TextModeConstants
Constants used throughout the TextMode module including shader property IDs, default values, and configuration limits.
TextModeEffectPlayer
Runs text effects against a grid, advancing every active effect once per frame and handing out the pooled scratch storage they need.
TextModeGridCapture
Renders a TextMode grid into a render texture where every cell is an exact whole number of pixels, for effects that process the grid as an image, such as the CRT.
TextModeLayoutUtil
Shared utility for computing text mode grid layout from font size and available space. Used by both TextModeView (world-space) and UITextModeView (Canvas).
TextModeMaterials
Manages shader loading and material creation for the TextMode rendering pipeline. Caches materials to prevent redundant allocations.
Build Note: Shaders are loaded via Shader.Find. Because no material asset
references them, Unity's build stripping would drop them (turning cells pink in players).
The Scylla editor build preprocessor handles this automatically: it adds every
Scylla/TextMode/ shader to the Always Included Shaders list before each
build (see the module's shader provider and the Core build processor). No manual step is
required; adding them yourself under Edit > Project Settings > Graphics still
works as a fallback.
TextModeMouseReporter
Captures mouse input and encodes it as ANSI terminal mouse reporting sequences. Requires a TerminalEmulator to read the active mouse tracking and encoding modes. When mouse reporting is active, selection input on an optional TextModeSelectionManager is automatically suppressed.
TextModeMouseReportingEvent
Event published when a TextModeMouseReporter encodes a mouse event into a terminal byte sequence. Disabled by default due to high-frequency mouse event volume; enable via PublishEvents.
TextModeSelectionChangedEvent
Event published when a text selection changes (mouse dragged to a new cell) in a TextModeSelectionManager.
TextModeSelectionEndedEvent
Event published when a text selection ends (mouse released or selection cleared) in a TextModeSelectionManager.
TextModeSelectionManager
Manages click-drag text selection for a text mode grid view. Place this component alongside a TextModeView or UITextModeView and assign the view as the grid provider. Handles mouse input, applies Selected to affected cells, and provides text extraction and clipboard support.
TextModeSelectionStartedEvent
Event published when a text selection begins in a TextModeSelectionManager.
TextModeTerminal
Reusable terminal UI frontend component. Composes a UITextModeView (GPU grid renderer), TerminalScrollbackBuffer, TerminalGridRenderer, TerminalCLI, TerminalEmulator, and TextModeSelectionManager into a complete terminal panel.
Has two operational modes:
- Log Mode (default): Scrollback buffer + optional CLI input row.
- Full-Screen Mode: Alternate screen buffer driven by TerminalEmulator.
This is a plain C# class (not MonoBehaviour) with zero dependencies beyond Core, TextMode, and Unity.InputSystem. The terminal uses transparent cell backgrounds by default; consumers add their own background behind the view.
TextModeTerminalHost
Places a TextModeTerminal in a scene: it builds the terminal from the settings on the component when the scene starts, updates it every frame and destroys it with the component.
TextModeThemeBackground
Colors a UI graphic, such as the image behind a TextMode view, with a theme's background color, and keeps it in step with theme changes and the display inversion.
TextModeThemeChangedEvent
Event published when the active TextMode color theme changes. Views and terminals subscribe to this to re-adopt the theme's colors and, where a color map is supplied, to recolor the content they already hold.
TextModeThemeRemapper
Recolors content that is already on screen when the theme changes, by rewriting any color that came from the outgoing theme to the matching color in the incoming one.
TextModeThemes
Holds the active TextMode color theme and switches it. Setting a theme pushes its ANSI colors to ANSIColor and publishes a TextModeThemeChangedEvent that views and terminals act on.
TextModeView
World-space MonoBehaviour component for rendering a text mode cell grid. Manages a CellGrid and CellBufferRenderer to display a fixed grid of character cells with SDF font rendering. Grid columns, rows, and cell dimensions are auto-computed from FontSize, PixelsPerUnit, and the view dimensions (ViewWidth/ViewHeight).
ThemeSettings
Settings for the color theme applied to text mode views.
TransitionEffectBase
Base class for effects that move a region from what is on screen now to something else.
TransitionEffectPreset
An authored transition look: the ordering cells change over in, and whether each cell fades through the change or switches in a single frame.
TwinkleEffect
Scatters points of light through the empty parts of a region, each fading up and back down on its own clock before moving somewhere else.
TwinkleEffectPreset
An authored twinkle look: how dense the field of points is, how long each lives, what they are drawn with and how bright they get.
TypewriterCharacterRevealedEvent
Event published by a typewriter effect each time it reveals a character, so game code can play a keystroke sound without polling the effect.
TypewriterEffect
Reveals text one character at a time, the way a terminal prints in an old film.
TypewriterEffectPreset
An authored typewriter look: typing speed, cursor and colors.
UITextModeView
UI Canvas variant of the text mode grid renderer. Extends UnityEngine.UI.MaskableGraphic to support Canvas masking, CanvasGroup alpha, and RectTransform-based layout. Renders the cell grid using a fullscreen quad where the fragment shader computes cell indices from pixel position. Grid columns and rows are auto-computed from FontSize and the RectTransform dimensions.
VTParser
VT/ANSI escape sequence parser implementing a finite state machine based on Paul Williams' DEC-compatible parser. Accepts input bytes that may be split across reads (essential for terminal correctness) and emits semantic events to an IVTParserHandler.
WaveEffect
Rolls a sine wave through a region, displacing its rows or columns as it passes.
WaveEffectPreset
An authored wave look: how far the displacement reaches and how tight the ripple is.
Structs
BoxStyleCharacters.BoxChars
Box drawing character set. Order: TopLeft, TopRight, BottomLeft, BottomRight, Horizontal, Vertical.
Cell
GPU-optimized cell data structure for the text mode grid.
Each cell represents a single character position with glyph, colors, and attributes.
The struct is 32 bytes (GPU cache-line friendly) and maps directly to a
StructuredBuffer<Cell> in the TextModeCell shader.
CellMask
Assigns every cell in a region a value between 0 and 1 describing how early the effect reaches it.
CellPosition
Represents a position in a text mode grid as a (row, column) coordinate pair. Uses row-first ordering for linear document order comparison.
CellRange
Represents a text selection range in a cell grid defined by an anchor (mouse-down) and active (current mouse) position. Provides normalized Start/End accessors that always return positions in document order regardless of selection direction.
CellRect
A rectangular block of cells in a text mode grid, addressed as a top-left (row, column) origin plus a row count and a column count.
PackedGlyphData
Pre-computed glyph data for direct stamping into Cell structs.
ScrollbackAttributeRun
A styled span within a scrollback line, covering a range of characters that share the same CellAttributes.
ScrollbackLine
A single line stored in the scrollback buffer.
ScyllaTextMode.Meta
Module meta information.
TextModeCellBorder
A frame of whole cells around the part of a grid that holds content, one width per side.
TextModeColorScheme
The resolved colors of one TextMode theme. This is the runtime value a view or a terminal draws with, produced from a palette by FromPalette(ColorPalette).
TextModeColorSet
Authoring container holding every color a TextMode theme defines: the sixteen ANSI colors that indexed text is drawn with, and the semantic colors that name what a color is for. Passed to CreateEntries(in TextModeColorSet) to produce the palette entries for one theme.
TextModeTerminalSettings
Configuration settings for a TextModeTerminal. Describes text rendering, cursor, scrollback, CLI, and selection options. Use CreateDefault() for sensible defaults.
Interfaces
IAutoCompleter
Interface for pluggable auto-completion in terminal CLI input. Allows terminal components to provide tab-completion without depending on a specific auto-complete implementation (e.g. console commands).
IInputHistory
Interface for pluggable input history navigation. Allows terminal CLI components to navigate through previously entered input using up/down arrow keys without depending on a specific history implementation.
ITextEffect
A time-based animation that writes cells into a region of a text mode grid.
ITextEffectContext
The services a running text effect needs from whatever is hosting it: somewhere to write, a glyph cache to stamp with, and pooled scratch storage.
ITextModeGridProvider
Interface abstracting the shared API of text mode view types (TextModeView and UITextModeView). Used by TextModeSelectionManager and the text effects system to work with either view type.
ITextModePointerMapper
Maps a screen point to a position on a TextMode grid when the grid is not shown in its own place on screen, for example when a CRT effect curves and letterboxes it.
ITextModeRenderSource
A TextMode view whose grid can be rendered somewhere other than its own place on screen, for example into a render texture by TextModeGridCapture.
ITextModeViewHost
A component that creates its UITextModeView at runtime rather than holding one on its own GameObject, such as TextModeTerminalHost.
IVTParserHandler
Interface for handling events emitted by the VTParser. Implementations receive parsed VT/ANSI escape sequence events and translate them into terminal state mutations.
Enums
BackgroundBlendMode
Defines how background colors are blended when drawing text operations.
BoxStyle
Defines the box drawing character style used for DrawBox(int, int, int, int, BoxStyle, Color32, Color32). Each style uses a specific set of Unicode box drawing characters (U+2500-U+257F).
CellAttributes
Flags enum defining style and state attributes for a text mode cell. Packed into the Attributes field as a uint bitmask. Bits 0-15 are used for style flags, bits 16-23 for the hyperlink tag, and bits 24-31 for the atlas index.
CursorStyle
Defines the visual style of the terminal cursor.
MouseEncodingMode
Defines the encoding format used for mouse event reporting. The encoding mode is orthogonal to the tracking mode and determines how mouse coordinates and button state are serialized into byte sequences.
Reference: XTerm Control Sequences - Mouse Tracking
MouseTrackingMode
Defines the xterm mouse tracking mode set via DEC private mode escape sequences. Each mode determines which mouse events are reported to the terminal application. Tracking modes are mutually exclusive; enabling one disables any previously active mode.
Reference: XTerm Control Sequences - Mouse Tracking
TerminalMouseButton
Defines the xterm mouse protocol button values. These values correspond to the button field in mouse reporting sequences.
TextAlignment
Defines horizontal text alignment for PrintAligned(int, string, TextAlignment, Color32, Color32, CellAttributes).
TextEffectDirection
Edge or axis direction used by text effects that move or reveal content directionally.
TextEffectMaskPattern
The shape a CellMask traces across a region.
TextEffectPushMode
How the outgoing and incoming screens move relative to each other during a push transition.
TextEffectState
Lifecycle states of a text effect.
TextEffectTimeMode
Selects which clock a text effect advances on.
TextModeTerminalColorTheme
Where a TextModeTerminalHost takes its colors from.
TextModeTerminalStartMode
The mode a TextModeTerminalHost starts its terminal in.
TextWrapMode
Controls how PrintWrapped(int, int, int, string, Color32, Color32, CellAttributes) breaks lines when text exceeds the available width. Explicit newline characters always start a new line regardless of the mode.