Core Concepts
beginner conceptsDigits 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:
| Component | Renderer | Best For |
|---|---|---|
| DigitsUI | Canvas / RawImage | HUD elements: scores, health bars, timers, counters |
| Digits3D | MeshRenderer | World-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
profileproperty (notsharedProfile) automatically clones the profile for safe per-object customization. - Create presets — save profiles as assets to reuse across scenes and projects.
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:
| Effect | Description |
|---|---|
| Scroll | Digits roll up or down like a mechanical counter |
| Morph | Smooth shape interpolation between digit glyphs |
| Fade | Cross-fade between old and new digit values |
| Flip Vertical | 3D flip around horizontal axis (airport board style) |
| Flip Horizontal | 3D flip around vertical axis |
| Flip Clock | Split-flap mechanical clock animation |
| Pixelate | Pixelation dissolve between values |
| None | Instant 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:
| Effect | Description |
|---|---|
| Glow | Soft luminous outline around digits |
| Fire | Animated flame effect on digit edges |
| Ice | Frosted crystalline appearance |
| Glitter | Sparkle particles across the display surface |
| Scan Lines | Horizontal scan line overlay (retro/CRT look) |
| Glitch | Random displacement and color separation (cyberpunk) |
| Bevel | Raised 3D appearance for digits |
| Shadow | Drop shadow beneath digits for depth |
| Outline | Solid 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.
| Layout | Description |
|---|---|
| Horizontal | Standard left-to-right fill bar |
| Vertical | Bottom-to-top fill bar |
| Circular | Radial 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.
| Format | Input | Output |
|---|---|---|
"0.00" | 123.456 | 123.45 |
"0,000" | 1234 | 1,234 |
"'SCORE: '00000" | 1234 | SCORE: 01234 |
"HH:MM:SS" | 5025 | 01:23:45 |
"0.0%" | 0.5 | 50.0% |
"0.0K" | 1500 | 1.5K |
"#.##B" | 5400000000 | 5.4B |
"0.00T" | 1230000000000 | 1.23T |
Scale suffix tokens divide the value by a fixed amount and append the suffix letter:
| Token | Scale | Suffix |
|---|---|---|
K | Thousands | 103 |
M | Millions | 106 |
B | Billions | 109 |
T | Trillions | 1012 |
Qa | Quadrillions | 1015 |
Qi | Quintillions | 1018 |
"0.0B" for billions, not "0.0b".
"'$'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:
- Warmup — call
Digits3DPool.Warmup(count)at scene start to pre-create instances. - Create — use
Digits3DPool.Create(position, rotation)instead ofInstantiate. - Release — call
Digits3DPool.Release(instance)when done, or enableselfDestructOnFadeOutin the profile for automatic return.
Next Steps
- Scripting Support (C#) — full API reference with code examples.
- FAQ — answers to common questions.
Suggest an improvement
Help us improve this documentation page.