Namespace Scylla.Core.Util.UI
Classes
DebugCanvasUtil
Creates and configures a screen-space debug canvas and ensures an UnityEngine.EventSystems.EventSystem exists in the scene.
GradientBackground
A plain C# helper that renders a smooth vertical gradient background by stretching a
2x2 Texture2D over a full-size RawImage child object.
LineScrollTextArea
A line-by-line scrolling text display component for terminal and console-style output.
Scrolls by discrete logical lines rather than pixels and uses TextMeshProUGUI
for rendering.
LineScrollTextAreaBuilder
Fluent builder for creating and configuring LineScrollTextArea instances at runtime. All configuration methods return the same builder instance, enabling chainable method calls. Call Build() or TryBuild(out LineScrollTextArea) as the terminal step to construct the Unity GameObject and obtain the component.
LineScrollTextBuffer
A fixed-capacity ring buffer for storing logical text lines with line-based scrolling support. Designed for terminal/console-style text output where each stored entry is a logical line that may wrap into multiple visual (display) lines.
LineScrollTextBuffer.Builder
Fluent builder for creating and configuring LineScrollTextBuffer instances.
LineScrollTextBufferLineAddedEvent
Event published by a LineScrollTextBuffer each time a new logical line of text is appended to the buffer. Consumers can use this to trigger a display refresh or track buffer growth.
LineScrollTextBufferScrolledEvent
Event published by a LineScrollTextBuffer whenever its view offset changes, indicating that the set of visible lines has shifted up or down. Subscribe to this event to refresh a display component when the buffer scrolls.
ScrollPhysics
Handles momentum decay and elastic bounce calculations for smooth scrolling. Provides iOS-style physics for pixel-based scroll views, including drag tracking, fling momentum, elastic over-scroll, and optional line snapping.
ScrollTextArea
A pixel-accurate scrolling text area with iOS-style momentum physics and elastic overshoot bounce, intended for log viewers, chat windows, and any output display that needs smooth continuous scrolling.
ScrollTextAreaBuilder
Fluent builder for creating and configuring ScrollTextArea instances at runtime. All configuration methods return the same builder instance, enabling chainable method calls. Call Build() or TryBuild(out ScrollTextArea) as the terminal step to construct the Unity GameObject and obtain the component.
ScrollTextAreaDragEndedEvent
Event published by a ScrollTextArea when the user releases a drag-scroll gesture (pointer up). Carries the final scroll position and the pointer velocity at release, which can be used to implement momentum (inertial) scrolling.
ScrollTextAreaDragStartedEvent
Event published by a ScrollTextArea when the user begins a drag-scroll gesture (pointer down followed by pointer move). Consumers can use this to pause auto-scroll-to-bottom behavior while the user is manually dragging.
ScrollTextAreaScrolledEvent
Event published by a ScrollTextArea whenever its scroll position changes, whether by user drag, mouse wheel, programmatic scroll, or momentum continuation. Subscribe to this event to react to any scroll movement on a specific area.
ScrollTextBuffer
A fixed-capacity ring buffer for storing text lines with pixel-height caching, designed for smooth pixel-based scrolling with accurate TMP measurement integration.
ScrollTextBuffer.Builder
Fluent builder for creating and configuring ScrollTextBuffer instances.
ScrollTextBufferLineAddedEvent
Event published by a ScrollTextBuffer each time a new line of text is appended to the buffer. Consumers can use this to refresh displays or track buffer growth.
ScyllaScrollRect
A scroll rect that keeps the elastic bounce for dragging, clamps wheel and trackpad scrolling to the ends of the content, and scrolls horizontally in the direction the gesture asks for.
ScyllaUIAdaptiveStack
Orientation-responsive stack that switches between horizontal and vertical layout at runtime based on the parent viewport's aspect ratio. Useful for UI surfaces that should reflow between landscape (side-by-side) and portrait (top-to-bottom) without designer intervention. Extends ScyllaUIStackBase with a dynamically computed IsHorizontal orientation.
ScyllaUIFlexElement
Per-child layout descriptor used by a Scylla UI stack to allocate main-axis space,
constrain cross-axis size, and opt the child out of the solve entirely. Conceptually
equivalent to Unity's LayoutElement but with grow and shrink weights and
ScyllaUILength-based size bounds.
ScyllaUIGrid
Track-based 2D layout container. Children sit in explicit column and row tracks and may pin to a cell plus span via ScyllaUIGridItem; children without a grid item auto-flow into the next available cell, row by row.
ScyllaUIGridItem
Per-child cell pin and span descriptor for a direct child of ScyllaUIGrid. When this component is absent the grid auto-flows the child into the next available cell, row by row. When attached, the child is placed at the explicit zero-based Column / Row coordinate and may occupy multiple tracks via ColumnSpan / RowSpan.
ScyllaUIHStack
Horizontal stack container. Lays out children left-to-right along the X axis with configurable alignment, cross-axis alignment, padding, spacing, and per-axis sizing modes. Extends ScyllaUIStackBase with a fixed horizontal orientation.
ScyllaUILayoutAnimator
Per-stack animator that smoothly interpolates child positions and sizes between
successive layout solves. Listens to Scylla.Core.Util.UI.ScyllaUIStackBase.OnSolved;
after each solve it snaps each child back to its previously-applied
anchoredPosition/sizeDelta and starts a ScyllaTween animation
toward the freshly solved values.
ScyllaUILayoutDebugDraw
Debug overlay for the Scylla UI Layout components. Walks the ScyllaUILayoutRoot's descendant hierarchy and draws a thin outline around every layout container and every wrapped child, using a distinct color per component type so designers can visually trace the layout structure.
ScyllaUILayoutGizmos
Optional Scene-view gizmo overlay for Scylla UI Layout components. Attach to a
GameObject that also hosts a ScyllaUIStackBase or
ScyllaUIScreenMargin to visualize its padding, inter-child gap, and
safe-area inset directly in the Scene view. Editor-only; OnDrawGizmos is
stripped from runtime builds by Unity.
ScyllaUILayoutRoot
Scene root for the Scylla UI layout system. Hosts the dirty-batch tick, watches resolution and orientation changes, and drives the solve for every ScyllaUIStackBase in its descendant tree.
ScyllaUILayoutStyle
Shared style preset for Scylla UI Layout stacks. Holds default padding, spacing, and alignment values plus an ordered list of aspect-ratio breakpoints. References by many ScyllaUIStackBase instances enable project-wide restyling by editing a single asset; conceptually a CSS-class analog.
ScyllaUIPositioned
Per-child placement override for a direct child of a ScyllaUIZStack. Specifies a 9-point reference anchor on the parent's inner content area plus per-axis offsets expressed as ScyllaUILength values.
ScyllaUIScreenMargin
Safe-area aware screen-margin component. Combines UnityEngine.Screen.safeArea (toggled per edge) with a designer-tunable per-edge margin, then applies the resulting inset to its own RectTransform as anchored stretch values.
ScyllaUISpacer
An empty layout element that either consumes free main-axis space (flexible mode) or reserves a fixed main-axis length (fixed mode). Used to push siblings apart in a stack without inserting an empty RectTransform with custom margin math.
ScyllaUIStackBase
Abstract base class for Scylla UI stack containers (ScyllaUIHStack
and ScyllaUIVStack). Encapsulates shared properties, child snapshot
management, dirty-batching, and the upward UnityEngine.UI.ILayoutElement interop
used to compose Scylla stacks inside native uGUI containers like
ScrollRect.
ScyllaUIText
Content-aware text wrapper that exposes a TMP_Text component's auto-size pipeline
through a Scylla-flavored API. Configures the underlying TMP_Text's
enableAutoSizing / fontSizeMin / fontSizeMax from a single
component, so designers don't need to remember the TMP knobs and Scylla can
coordinate sizes across siblings via ScyllaUITextGroup.
ScyllaUITextGroup
Synchronizes the rendered font size across a set of ScyllaUIText siblings. Each member is allowed to compute its own TMP auto-size; the group then reads the resulting sizes, takes the minimum, and broadcasts it back so every member renders at a uniform point size. Useful for groups of button labels whose strings vary in length.
ScyllaUIVStack
Vertical stack container. Lays out children top-to-bottom along the Y axis with configurable alignment, cross-axis alignment, padding, spacing, and per-axis sizing modes. Extends ScyllaUIStackBase with a fixed vertical orientation.
ScyllaUIZStack
Depth/overlay stack container. Children sit atop each other at the same content
origin instead of being distributed along a main axis. Maps conceptually to a
SwiftUI ZStack or a Flutter Stack. Extends
ScyllaUIStackBase with overlay placement semantics.
TMPSettings
Immutable-by-convention configuration bag for creating and configuring
TMP_Text components through the Scylla UI utilities.
TMPUtil
Provides utility methods for TextMeshPro (TMP) operations including component creation, text measurement, line-count calculation, and configuration helpers.
UIAnchors
Provides a library of pre-configured UIAnchor presets covering the nine standard alignment positions and common stretch configurations, together with factory methods for custom and alignment-driven anchors.
UIFontReference
Serializable wrapper around a TMP_FontAsset that lets consumers configure
fonts in the Unity Inspector or at runtime without taking a direct dependency on
the TextMeshPro namespace.
UITextBuilder
Fluent builder for creating and configuring TMPro.TextMeshProUGUI text elements at runtime. All configuration methods return the same builder instance, enabling chainable method calls. Call Build() or TryBuild(out TextMeshProUGUI) as the terminal step to construct the Unity GameObject and obtain the TMP component.
UITextComponent
Concrete implementation of IUIText that wraps a TextMeshProUGUI
component and provides zero-allocation pass-through for high-performance text operations.
UITextFactory
Factory for creating IUIText instances backed by TextMeshProUGUI.
Isolates consumers from direct TMP API dependencies so the underlying rendering
component can be swapped without changing call sites.
UITextFieldBuilder
Fluent builder for creating and configuring TMP_InputField elements at
runtime. All configuration methods return the same builder instance, enabling
chainable method calls. Call Build() or TryBuild(out TMP_InputField) as
the terminal step to construct the Unity hierarchy and obtain the input field
component.
UITextFieldComponent
Concrete implementation of IUITextField that wraps a
TMP_InputField and provides a TMP-agnostic interface for input field operations.
UIUtil
Provides general utility methods for uGUI operations including DPI-aware scaling, Unity layer management, GameObject creation, and coordinate conversion helpers.
Structs
LineScrollTextBuffer.LogicalLine
Represents a single logical line of text with a cached visual wrap count.
LineScrollWindow
Represents a snapshot of the currently visible content produced by GetWindow(). Contains the visible VisualLine array and scroll state, allowing rendering code to operate without holding a reference to the buffer.
LineScrollWindow.Enumerator
Value-type enumerator for visible lines in a LineScrollWindow.
Implements the duck-typed foreach pattern (MoveNext, Current,
Dispose) so that foreach (var line in window) works without boxing
the enumerator through IEnumerator<VisualLine>.
ScrollTextBuffer.ScrollTextLine
Represents a single line of text with a cached pixel height for efficient scroll calculation.
ScrollTextLineView
Represents a visible line with its pixel position, produced by GetVisibleLines(float, float) for use during rendering.
ScyllaUIAspectBreakpoint
Aspect-ratio breakpoint used by ScyllaUILayoutStyle to override a base style's padding, spacing, and alignment when the current viewport aspect ratio matches a designer-configured threshold. Conceptually analogous to a CSS media query.
ScyllaUIEdgeInsets
A per-edge inset value used for both stack padding and screen margins. Each edge is a ScyllaUILength so individual edges may be expressed as absolute pixels or as a percent of the relevant parent dimension.
ScyllaUILayoutDebugDrawConfig
Serializable configuration for ScyllaUILayoutDebugDraw. Holds the per-component-type outline colors and the line thickness used by the runtime overlay. Stored as a struct so designers can edit it as a single Inspector property and consumers can take a snapshot for animation or A/B preview.
ScyllaUILength
A length value used throughout the Scylla UI layout system. Encodes both a numeric value and a unit mode (Absolute for reference pixels, Percent for a fraction of a parent dimension). Resolved against a property-specific parent dimension at solve time via Resolve(float).
ScyllaUITrack
One column or row track definition for ScyllaUIGrid. Combines a ScyllaUITrackSizingMode with the values that mode requires (explicit size for Fixed, fractional weight for Fractional, a min/max pair for MinMax).
TextSelectionPosition
Represents a position within a text buffer, defined by a logical line index and a character index within that line. Used by TextSelectionRange to define the anchor and active endpoints of a text selection.
TextSelectionRange
Represents a range of selected text defined by an anchor (start) and an active (end) position. Used by LineScrollWindow to render selection highlights via WriteToWithSelection(StringBuilder, TextSelectionRange, string).
UIAnchor
Represents a complete anchor and pivot configuration for positioning a
RectTransform within its parent canvas or panel.
UIMargin
Represents the external spacing (margin) around a UI element, expressed as individual per-side pixel values for left, right, top, and bottom edges.
UIPadding
Represents the internal spacing (padding) inside a UI element, expressed as individual per-side pixel values for left, right, top, and bottom edges.
VisualLine
Represents a single visual line of text within a scrolling text buffer. A visual line is one rendered row on screen - either an entire logical line (when no wrapping occurs) or a word-wrapped segment of a longer logical line.
Interfaces
IUIText
TMP-agnostic abstraction for a read-only or label-style UI text component.
IUITextField
TMP-agnostic abstraction for a single-line or multi-line text input field.
Enums
ScrollDirection
Defines the direction of a line-based scroll operation in a LineScrollTextBuffer. Used by LineScrollTextBufferScrolledEvent to describe which way the view window moved.
ScyllaUIAlignment
Main-axis distribution mode for a Scylla UI stack container (ScyllaUIHStack, ScyllaUIVStack). Decides how children are positioned and how free space is allocated along the main axis.
ScyllaUICrossAlignment
Cross-axis alignment mode for the children of a Scylla UI stack container. Maps
conceptually to the CSS align-items property.
ScyllaUIFitMode
Per-child fit mode used by ScyllaUIFlexElement. Decides how a child uses the main-axis space its parent allocates for it.
ScyllaUILengthUnit
Unit mode for a ScyllaUILength value. Distinguishes between absolute reference-resolution pixel values and percentage values resolved against a parent dimension at solve time.
ScyllaUISizeMode
Per-axis sizing mode for a Scylla UI stack container. Controls whether the stack expands to its parent, shrinks to its content, or uses an explicit size from its RectTransform.
ScyllaUITrackSizingMode
Sizing mode for a single column or row track in ScyllaUIGrid. Drives how the grid solver allocates space to each track.
UIAlignment
Defines the nine canonical alignment positions within a rectangular parent area, arranged in a 3x3 grid of upper, middle, and lower rows crossed with left, center, and right columns.
UIFontStyle
Bitfield flags that specify the typographic decoration applied to a UI text element.