Core Concepts

beginner concepts

Digits FX · Core Concepts

Core Concepts

This page covers the main concepts you need to understand when working with Digits FX: the component types, the profile system, visual effects, progress bars, and number formatting.

Component Types

Digits FX provides two main components, both inheriting from the Digits base class:

ComponentRendererBest For
DigitsUICanvas / RawImageHUD elements: scores, health bars, timers, counters
Digits3DMeshRendererWorld-space displays: floating damage numbers, labels, 3D counters

Both components share the same profile system and API. The only difference is the rendering backend.

The Profile System

A DigitsProfile is a ScriptableObject that stores all visual and behavioral settings for a display. Profiles enable you to:

  • Share settings — assign the same profile to multiple displays for consistent styling.
  • Per-instance overrides — accessing the profile property (not sharedProfile) automatically clones the profile for safe per-object customization.
  • Create presets — save profiles as assets to reuse across scenes and projects.
Shared vs. Instance profiles: Use sharedProfile when you want changes to affect all objects using that profile. Use profile when you need per-object customization — it automatically creates a clone on first access.

Transition Effects

When a value changes, each digit can animate independently using one of these transitions:

EffectDescription
ScrollDigits roll up or down like a mechanical counter
MorphSmooth shape interpolation between digit glyphs
FadeCross-fade between old and new digit values
Flip Vertical3D flip around horizontal axis (airport board style)
Flip Horizontal3D flip around vertical axis
Flip ClockSplit-flap mechanical clock animation
PixelatePixelation dissolve between values
NoneInstant value change with no animation

Each transition supports configurable easing functions (Linear, EaseIn, EaseOut, EaseInOut, Cubic, Bounce, and more) and duration settings.

Visual Effects

Digits FX includes several shader-based visual effects that can be combined:

EffectDescription
GlowSoft luminous outline around digits
FireAnimated flame effect on digit edges
IceFrosted crystalline appearance
GlitterSparkle particles across the display surface
Scan LinesHorizontal scan line overlay (retro/CRT look)
GlitchRandom displacement and color separation (cyberpunk)
BevelRaised 3D appearance for digits
ShadowDrop shadow beneath digits for depth
OutlineSolid outline around each digit for readability

Progress Bars

Every Digits component includes a built-in progress bar that can be displayed alongside or instead of numeric values.

LayoutDescription
HorizontalStandard left-to-right fill bar
VerticalBottom-to-top fill bar
CircularRadial fill (ring/arc) around a center point

Enable the Damage Indicator option to show a trailing segment that visualizes recent value decreases — commonly used for health bars in games.

Format Strings

The formatString property in the profile controls how numbers are rendered. Digits FX uses a custom formatting engine (not C#'s ToString) for zero-allocation performance.

FormatInputOutput
"0.00"123.456123.45
"0,000"12341,234
"'SCORE: '00000"1234SCORE: 01234
"HH:MM:SS"502501:23:45
"0.0%"0.550.0%
"0.0K"15001.5K
"#.##B"54000000005.4B
"0.00T"12300000000001.23T

Scale suffix tokens divide the value by a fixed amount and append the suffix letter:

TokenScaleSuffix
KThousands103
MMillions106
BBillions109
TTrillions1012
QaQuadrillions1015
QiQuintillions1018
Tip: Scale suffix tokens must be uppercase to avoid conflicts with literal text. Use "0.0B" for billions, not "0.0b".
Tip: Wrap literal text in single quotes within the format string. For example, "'$'0,000.00" renders as $1,234.56.

Object Pooling (Digits3D)

For frequently created and destroyed 3D displays (such as floating damage numbers), use the Digits3DPool static utility to avoid runtime allocations:

  1. Warmup — call Digits3DPool.Warmup(count) at scene start to pre-create instances.
  2. Create — use Digits3DPool.Create(position, rotation) instead of Instantiate.
  3. Release — call Digits3DPool.Release(instance) when done, or enable selfDestructOnFadeOut in the profile for automatic return.

Next Steps

Was this page helpful?