Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Console.TextMode
      • IConsoleScreen
      • TextModeDebugConsoleDisplay
      • TicTacToeCommand
      • TicTacToeScreen
    • Scylla.TextMode
      • ANSIAttributeParser
      • ANSIColor
      • ANSISGRAttributes
      • AmbientEffectBase
      • BackgroundBlendMode
      • BoxStyle
      • BoxStyleCharacters
      • BoxStyleCharacters.BoxChars
      • CRTSettings
      • Cell
      • CellAttributes
      • CellAttributesExtensions
      • CellBuffer
      • CellBufferRenderer
      • CellGrid
      • CellMask
      • CellPosition
      • CellRange
      • CellRect
      • ColorCycleEffect
      • ColorCycleEffectPreset
      • CrossFadeEffect
      • CursorStyle
      • DecodeEffect
      • DecodeEffectPreset
      • DigitalRainEffect
      • DigitalRainEffectPreset
      • EffectsSettings
      • FadeEffect
      • FadeEffectPreset
      • FlickerEffect
      • FlickerEffectPreset
      • GlitchEffect
      • GlitchEffectPreset
      • GlyphAtlasCache
      • GridSettings
      • IAutoCompleter
      • IInputHistory
      • ITextEffect
      • ITextEffectContext
      • ITextModeGridProvider
      • ITextModePointerMapper
      • ITextModeRenderSource
      • ITextModeViewHost
      • IVTParserHandler
      • InputHistory
      • MaskTransitionEffect
      • MouseEncodingMode
      • MouseTrackingMode
      • PackedGlyphData
      • PulseEffect
      • PulseEffectPreset
      • PushEffect
      • PushEffectPreset
      • SDFSettings
      • ScrollbackAttributeRun
      • ScrollbackLine
      • ScyllaTextMode
      • ScyllaTextMode.Meta
      • ScyllaTextModeConfiguration
      • SlideInEffect
      • SlideInEffectPreset
      • StaticTuneInEffect
      • StaticTuneInEffectPreset
      • TerminalCLI
      • TerminalEmulator
      • TerminalGridRenderer
      • TerminalInputEncoder
      • TerminalMouseButton
      • TerminalScrollbackBuffer
      • TerminalSettings
      • TextAlignment
      • TextEffectBase
      • TextEffectCompletedEvent
      • TextEffectDirection
      • TextEffectExtensions
      • TextEffectMaskPattern
      • TextEffectPreset
      • TextEffectPushMode
      • TextEffectSequencer
      • TextEffectStartedEvent
      • TextEffectState
      • TextEffectTimeMode
      • TextEffects
      • TextModeCellBorder
      • TextModeColorDefaults
      • TextModeColorScheme
      • TextModeColorSet
      • TextModeConfigurationChangedEvent
      • TextModeConsole
      • TextModeConstants
      • TextModeEffectPlayer
      • TextModeGridCapture
      • TextModeLayoutUtil
      • TextModeMaterials
      • TextModeMouseReporter
      • TextModeMouseReportingEvent
      • TextModeSelectionChangedEvent
      • TextModeSelectionEndedEvent
      • TextModeSelectionManager
      • TextModeSelectionStartedEvent
      • TextModeTerminal
      • TextModeTerminalColorTheme
      • TextModeTerminalHost
      • TextModeTerminalSettings
      • TextModeTerminalStartMode
      • TextModeThemeBackground
      • TextModeThemeChangedEvent
      • TextModeThemeRemapper
      • TextModeThemes
      • TextModeView
      • TextWrapMode
      • ThemeSettings
      • TransitionEffectBase
      • TransitionEffectPreset
      • TwinkleEffect
      • TwinkleEffectPreset
      • TypewriterCharacterRevealedEvent
      • TypewriterEffect
      • TypewriterEffectPreset
      • UITextModeView
      • VTParser
      • WaveEffect
      • WaveEffectPreset
    • Scylla.TextMode.CRT
      • CRTBeam
      • CRTBeamClock
      • CRTBeamScanDirection
      • CRTBeamStatus
      • CRTCalibrationPattern
      • CRTCurvatureShape
      • CRTGeometry
      • CRTHDR
      • CRTHDRDisplay
      • CRTHDRTarget
      • CRTHorizontalKernel
      • CRTImageRegion
      • CRTMaskType
      • CRTQualityTier
      • CRTScaleMode
      • CRTSignalStandard
      • CRTSignalType
      • ITextModeCRTCameraEffect
      • ITextModeCRTHDRDisplaySource
      • TextModeCRTBeam
      • TextModeCRTCalibration
      • TextModeCRTCameraEffects
      • TextModeCRTConstants
      • TextModeCRTDriver
      • TextModeCRTHDR
      • TextModeCRTImageRenderer
      • TextModeCRTMonitor
      • TextModeCRTPreset
      • TextModeCRTPresetRegistry
      • TextModeCRTScreen
      • TextModeCRTSettings
      • TextModeCRTTube
    • Scylla.TextMode.Editor
      • CellGridPreviewWidget
      • ColorPaletteWidget
      • ITextModeCRTCameraSetupProvider
      • ScyllaTextModeConfigurationEditor
      • ScyllaTextModeDependencyProvider
      • ScyllaTextModeEditor
      • ScyllaTextModeMenuItems
      • ScyllaTextModeShaderProvider
      • TextModeCRTCameraSetup
      • TextModeCRTCameraStatus
      • TextModeCRTDriverEditor
      • TextModeCRTMonitorEditor
      • TextModeCRTPresetEditor
      • TextModeCRTPresetGenerator
      • TextModeColorAssetGenerator
      • TextModeColorPaletteDefaults
      • TextModeTerminalHostEditor
      • TextModeThemeField
      • TextModeViewEditor
      • TextModeViewEditorBase
      • UITextModeViewEditor
    • Scylla.TextMode.URP
      • CRTQualityTierParameter
      • TextModeCRTInjectionPoint
      • TextModeCRTPresetParameter
      • TextModeCRTRendererFeature
      • TextModeCRTVolume

    Class 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.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    UIBehaviour
    Graphic
    MaskableGraphic
    UITextModeView
    Implements
    ICanvasElement
    IClippable
    IMaskable
    IMaterialModifier
    ITextModeRenderSource
    ITextModeGridProvider
    IScyllaInspectorChangeHandler
    Inherited Members
    MaskableGraphic.m_ShouldRecalculateStencil
    MaskableGraphic.m_MaskMaterial
    MaskableGraphic.m_StencilValue
    MaskableGraphic.GetModifiedMaterial(Material)
    MaskableGraphic.Cull(Rect, bool)
    MaskableGraphic.SetClipRect(Rect, bool)
    MaskableGraphic.SetClipSoftness(Vector2)
    MaskableGraphic.OnValidate()
    MaskableGraphic.OnTransformParentChanged()
    MaskableGraphic.OnCanvasHierarchyChanged()
    MaskableGraphic.RecalculateClipping()
    MaskableGraphic.RecalculateMasking()
    MaskableGraphic.Raycast(Vector2, Camera)
    MaskableGraphic.onCullStateChanged
    MaskableGraphic.maskable
    MaskableGraphic.isMaskingGraphic
    Graphic.s_DefaultUI
    Graphic.s_WhiteTexture
    Graphic.m_Material
    Graphic.m_SkipLayoutUpdate
    Graphic.m_SkipMaterialUpdate
    Graphic.m_OnDirtyLayoutCallback
    Graphic.m_OnDirtyVertsCallback
    Graphic.m_OnDirtyMaterialCallback
    Graphic.s_Mesh
    Graphic.m_CachedMesh
    Graphic.m_CachedUvs
    Graphic.SetAllDirty()
    Graphic.SetLayoutDirty()
    Graphic.SetVerticesDirty()
    Graphic.SetMaterialDirty()
    Graphic.SetRaycastDirty()
    Graphic.OnBeforeTransformParentChanged()
    Graphic.OnDestroy()
    Graphic.OnCullingChanged()
    Graphic.Rebuild(CanvasUpdate)
    Graphic.LayoutComplete()
    Graphic.GraphicUpdateComplete()
    Graphic.UpdateMaterial()
    Graphic.UpdateGeometry()
    Graphic.OnRebuildRequested()
    Graphic.Reset()
    Graphic.OnDidApplyAnimationProperties()
    Graphic.SetNativeSize()
    Graphic.Raycast(Vector2, Camera, bool)
    Graphic.PixelAdjustPoint(Vector2)
    Graphic.GetPixelAdjustedRect()
    Graphic.CrossFadeColor(Color, float, bool, bool)
    Graphic.CrossFadeColor(Color, float, bool, bool, bool)
    Graphic.CrossFadeAlpha(float, float, bool)
    Graphic.RegisterDirtyLayoutCallback(UnityAction)
    Graphic.UnregisterDirtyLayoutCallback(UnityAction)
    Graphic.RegisterDirtyVerticesCallback(UnityAction)
    Graphic.UnregisterDirtyVerticesCallback(UnityAction)
    Graphic.RegisterDirtyMaterialCallback(UnityAction)
    Graphic.UnregisterDirtyMaterialCallback(UnityAction)
    Graphic.defaultGraphicMaterial
    Graphic.color
    Graphic.raycastTarget
    Graphic.raycastPadding
    Graphic.useLegacyMeshGeneration
    Graphic.depth
    Graphic.rectTransform
    Graphic.canvas
    Graphic.canvasRenderer
    Graphic.defaultMaterial
    Graphic.material
    Graphic.materialForRendering
    Graphic.workerMesh
    UIBehaviour.Awake()
    UIBehaviour.Start()
    UIBehaviour.IsActive()
    UIBehaviour.OnCanvasGroupChanged()
    UIBehaviour.IsDestroyed()
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.transformHandle
    Component.gameObject
    Component.tag
    Object.GetEntityId()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsByType(Type)
    Object.FindObjectsByType(Type, FindObjectsInactive)
    Object.DontDestroyOnLoad(Object)
    Object.FindAnyObjectByType<T>()
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsByType<T>()
    Object.FindObjectsByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType(Type)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Scylla.TextMode
    Assembly: ScyllaTextMode.dll
    Syntax
    [ExecuteAlways]
    [DisallowMultipleComponent]
    [RequireComponent(typeof(CanvasRenderer))]
    [RequireComponent(typeof(RectTransform))]
    [AddComponentMenu("Scylla/TextMode/UI TextMode View")]
    public class UITextModeView : MaskableGraphic, ICanvasElement, IClippable, IMaskable, IMaterialModifier, ITextModeRenderSource, ITextModeGridProvider, IScyllaInspectorChangeHandler

    Properties

    BorderColor

    Gets the color the border cells show: DefaultBackground while BorderFollowsTheme is set, otherwise fully transparent.

    Declaration
    public Color32 BorderColor { get; }
    Property Value
    Type Description
    Color32
    Remarks

    For a view that follows the color theme this is the theme's background. A view that keeps its own colors gets a border in its own background color, so the border always matches the empty cells next to it.

    BorderFollowsTheme

    Gets or sets whether the CellBorder shows the grid's background color, DefaultBackground. Defaults to true.

    Declaration
    public bool BorderFollowsTheme { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    When false, the border is transparent, so whatever lies behind the view shows through it: the scene, a panel, or the clear color of the camera.

    CellBorder

    Gets or sets the frame of whole cells around the content grid. Defaults to none.

    Declaration
    public TextModeCellBorder CellBorder { get; set; }
    Property Value
    Type Description
    TextModeCellBorder
    Remarks

    The view lays out as many cells as fit its RectTransform and centers them. The outer cells on each side form the border: they show DefaultBackground and never hold content. Columns, Rows and Grid cover only the cells inside the frame, so everything that writes into the grid, such as a terminal with its line wrapping, scrolling and cursor, stays inside it.

    Reading returns the border in use. It can be smaller than the value set when the view is too small for it, because the content always keeps at least one column and one row. The value set is kept and applies again once there is room.

    CellSize

    Gets the computed cell size in canvas pixels.

    Declaration
    public Vector2 CellSize { get; }
    Property Value
    Type Description
    Vector2

    CharSpacing

    Gets or sets the character spacing multiplier. 1.0 = natural advance width. Values below 1.0 pack characters tighter. Changing this recomputes the grid layout.

    Declaration
    public float CharSpacing { get; set; }
    Property Value
    Type Description
    float

    Columns

    Gets the auto-computed number of content columns, without the CellBorder.

    Declaration
    public int Columns { get; }
    Property Value
    Type Description
    int

    CursorBlinkRate

    Gets or sets the cursor blink rate in full cycles per second. Higher values produce faster blinking. Default is 1.0 (1 second on, 1 second off).

    Declaration
    public float CursorBlinkRate { get; set; }
    Property Value
    Type Description
    float

    CursorBlinking

    Gets or sets whether the cursor blinks. When disabled, the cursor remains visible at all times.

    Declaration
    public bool CursorBlinking { get; set; }
    Property Value
    Type Description
    bool

    CursorColor

    Gets or sets the cursor color.

    Declaration
    public Color CursorColor { get; set; }
    Property Value
    Type Description
    Color

    CursorStyle

    Gets or sets the cursor visual style.

    Declaration
    public CursorStyle CursorStyle { get; set; }
    Property Value
    Type Description
    CursorStyle

    DefaultBackground

    Gets or sets the default background color used for empty cells and newly created cells during grid resize. Must be set before the view initializes for the initial grid creation to use the correct color.

    Declaration
    public Color32 DefaultBackground { get; set; }
    Property Value
    Type Description
    Color32

    DefaultForeground

    Gets or sets the default foreground color used for cells written without an explicit color, and for cells the grid fills when it is cleared or resized.

    Declaration
    public Color32 DefaultForeground { get; set; }
    Property Value
    Type Description
    Color32
    Remarks

    Setting this changes what future writes and clears use. It does not recolor cells that already hold a color, because every cell stores its own. Use TextModeThemeRemapper to retint existing content.

    DrawSelf

    Gets or sets whether the view draws its grid itself. Defaults to true.

    Declaration
    public bool DrawSelf { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    When false, the view draws an empty mesh, but it keeps uploading cells, running effects, blinking the cursor and handling input and selection. A component that shows the grid in another form, such as the CRT, turns it off and sets it back when it goes away. See ITextModeRenderSource.

    Effects

    Gets the effect player for this view, creating it the first time it is used.

    Declaration
    public TextModeEffectPlayer Effects { get; }
    Property Value
    Type Description
    TextModeEffectPlayer
    Remarks

    A view that never runs an effect never creates a player, so the cost of the effects system on an unused view is one null check per frame. Once created, the player is advanced in LateUpdate just before the grid is uploaded to the GPU, so effect writes reach the screen in the same frame they are computed.

    Returns null until the view is initialized, because effects need a grid to write into.

    FollowColorTheme

    Gets or sets whether this view adopts the active color theme when the theme changes.

    Declaration
    public bool FollowColorTheme { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Enabled by default, which is what makes a global theme switch repaint every view without the game redrawing anything. Turn it off for a view whose colors are owned by another system, so a theme change leaves them alone. The debug console is the case this exists for: it paints a transparent background so its own gradient shows through, and a theme would otherwise overwrite that with an opaque color.

    Turning this off suppresses only later theme changes. Colors already applied stay as they are, so set it before the first theme is applied when the view must never be retinted at all.

    FontAsset

    Gets or sets the TMP font asset used for glyph rendering. Setting a new font at runtime triggers a full re-initialization.

    Declaration
    public TMP_FontAsset FontAsset { get; set; }
    Property Value
    Type Description
    TMP_FontAsset

    FontSize

    Gets or sets the font size in canvas pixels. Changing the font size recomputes the grid layout and resizes the grid if needed.

    Declaration
    public float FontSize { get; set; }
    Property Value
    Type Description
    float

    GlyphCache

    Gets the glyph atlas cache.

    Declaration
    public GlyphAtlasCache GlyphCache { get; }
    Property Value
    Type Description
    GlyphAtlasCache

    Grid

    Gets the cell grid for reading and writing cell data.

    Declaration
    public CellGrid Grid { get; }
    Property Value
    Type Description
    CellGrid

    IsInitialized

    Gets whether the view is initialized.

    Declaration
    public bool IsInitialized { get; }
    Property Value
    Type Description
    bool

    LineHeight

    Gets or sets the line height multiplier. 1.0 = natural line height. Values above 1.0 add vertical spacing between rows. Changing this recomputes the grid layout.

    Declaration
    public float LineHeight { get; set; }
    Property Value
    Type Description
    float
    Remarks

    Values below 1.0 pack the rows closer together without changing the size of the glyphs. The space a line does not use is given up first, so nothing is lost down to roughly 0.82; below that the glyphs reach into the rows above and below, which draw the overhanging parts rather than clipping them.

    Assigning this takes ownership of the value. Until then the view uses the default line height from the TextMode module configuration and follows it when the configuration changes, in the same way it follows the configured SDF settings.

    PointerMapper

    Gets or sets the mapper that converts screen points to grid positions, or null to use the view's own area. Defaults to null. See PointerMapper.

    Declaration
    public ITextModePointerMapper PointerMapper { get; set; }
    Property Value
    Type Description
    ITextModePointerMapper

    Rows

    Gets the auto-computed number of content rows, without the CellBorder.

    Declaration
    public int Rows { get; }
    Property Value
    Type Description
    int

    SRGBCorrection

    Gets or sets whether sRGB-to-linear correction is applied when unpacking cell colors. Enable for correct brightness in Linear color space. Default is true.

    Declaration
    public bool SRGBCorrection { get; set; }
    Property Value
    Type Description
    bool

    SelectionColor

    Gets or sets the background of selected cells.

    Declaration
    public Color SelectionColor { get; set; }
    Property Value
    Type Description
    Color
    Remarks

    Selected cells are drawn in SelectionTextColor on this color, in place of their own colors. The built-in themes pick the pair so a selection reads as inverse text.

    SelectionTextColor

    Gets or sets the text color of selected cells. See SelectionColor.

    Declaration
    public Color SelectionTextColor { get; set; }
    Property Value
    Type Description
    Color

    TextBlinkRate

    Gets or sets the text blink rate in full cycles per second (for the Blink cell attribute). Higher values produce faster blinking. Default is 1.0 (1 second on, 1 second off).

    Declaration
    public float TextBlinkRate { get; set; }
    Property Value
    Type Description
    float

    mainTexture

    Gets the atlas texture for the material.

    Declaration
    public override Texture mainTexture { get; }
    Property Value
    Type Description
    Texture
    Overrides
    UnityEngine.UI.Graphic.mainTexture

    Methods

    ApplyTheme(in TextModeColorScheme)

    Applies a color theme to this view, replacing the default foreground and background, the cursor color and the selection color with the theme's.

    Declaration
    public void ApplyTheme(in TextModeColorScheme scheme)
    Parameters
    Type Name Description
    TextModeColorScheme scheme

    The resolved theme colors to apply.

    Remarks

    This changes what the view writes and clears with from now on. Text already on the grid keeps the colors it was written with, because every cell stores its own; pass the grid to TextModeThemeRemapper as well to retint it.

    OnDisable()

    Declaration
    protected override void OnDisable()
    Overrides
    UnityEngine.UI.MaskableGraphic.OnDisable()

    OnEnable()

    Declaration
    protected override void OnEnable()
    Overrides
    UnityEngine.UI.MaskableGraphic.OnEnable()

    OnPopulateMesh(VertexHelper)

    Populates the mesh with a fullscreen quad filling the RectTransform.

    Declaration
    protected override void OnPopulateMesh(VertexHelper vh)
    Parameters
    Type Name Description
    VertexHelper vh
    Overrides
    UnityEngine.UI.Graphic.OnPopulateMesh(UnityEngine.UI.VertexHelper)

    OnRectTransformDimensionsChange()

    Declaration
    protected override void OnRectTransformDimensionsChange()
    Overrides
    UnityEngine.UI.Graphic.OnRectTransformDimensionsChange()

    ResetCursorBlink()

    Resets the cursor blink cycle so it restarts from the visible phase. Call this on keystroke or input activity to keep the cursor visible during active typing, matching standard terminal emulator behavior.

    Declaration
    public void ResetCursorBlink()

    ScreenPointToCell(Vector2, Camera, out CellPosition)

    Converts a screen point to a cell position in the grid. Uses UnityEngine.RectTransformUtility.ScreenPointToLocalPointInRectangle(UnityEngine.RectTransform, UnityEngine.Vector2, UnityEngine.Camera, out UnityEngine.Vector2) to convert the screen point to local RectTransform coordinates, then maps to cell indices.

    Declaration
    public bool ScreenPointToCell(Vector2 screenPoint, Camera eventCamera, out CellPosition cellPosition)
    Parameters
    Type Name Description
    Vector2 screenPoint

    Screen-space point (e.g. from Mouse.current.position).

    Camera eventCamera

    Canvas event camera. Pass null for ScreenSpaceOverlay mode. For ScreenSpaceCamera mode, this must be the canvas world camera.

    CellPosition cellPosition

    The resulting cell position if the point is within the grid.

    Returns
    Type Description
    bool

    True if the screen point maps to a valid cell in the grid.

    SetCell(int, int, uint, Color32, Color32, CellAttributes)

    Sets a cell at the specified position with glyph atlas stamping.

    Declaration
    public void SetCell(int row, int col, uint codepoint, Color32 fg, Color32 bg, CellAttributes attributes = CellAttributes.None)
    Parameters
    Type Name Description
    int row

    Row index.

    int col

    Column index.

    uint codepoint

    Unicode codepoint.

    Color32 fg

    Foreground color.

    Color32 bg

    Background color.

    CellAttributes attributes

    Cell attributes.

    SetGrid(CellGrid)

    Replaces the active cell grid reference with an external grid. Used when a TerminalEmulator switches between primary and alternate screen buffers. The new grid must have the same dimensions as the current grid.

    Declaration
    public void SetGrid(CellGrid newGrid)
    Parameters
    Type Name Description
    CellGrid newGrid

    The new cell grid to render.

    TryWriteCellProperties(MaterialPropertyBlock)

    Writes everything a cell shader needs to shade this view's grid into a property block: the cell buffer, the grid size, the border and its color, the font atlas, the SDF, cursor and selection settings and the current blink phases.

    Declaration
    public bool TryWriteCellProperties(MaterialPropertyBlock block)
    Parameters
    Type Name Description
    MaterialPropertyBlock block

    The property block to write into. Existing values are overwritten.

    Returns
    Type Description
    bool

    True if the view is initialized and the block holds a complete set of properties.

    Remarks

    The cell size is not written, because it depends on the target. The caller sets _CellSize itself.

    Events

    GridResizing

    Raised when the view's layout changed the grid size, just before the view resizes the grid it renders. The arguments are the new row and column counts.

    Declaration
    public event Action<int, int> GridResizing
    Event Type
    Type Description
    Action<int, int>
    Remarks

    The owner of the grid can resize it here first, in its own way, and the view then finds it at the right size and leaves the content alone. A terminal uses this to keep the line with the cursor on screen instead of letting the view cut off the bottom rows.

    Implements

    UnityEngine.UI.ICanvasElement
    UnityEngine.UI.IClippable
    UnityEngine.UI.IMaskable
    UnityEngine.UI.IMaterialModifier
    ITextModeRenderSource
    ITextModeGridProvider
    Scylla.Core.Util.IScyllaInspectorChangeHandler
    In this article
    Back to top Scylla Framework - TextMode Module API Documentation