Logo
UI Elements

Progress Bar

Display progress with optional smoothing and formatted text

Overview

Progress Bar displays a value within a range. It supports a Procedural Shape fill, animated value changes, and an optional text label.

Preview

Usage

Create a Progress Bar and set its minimum and maximum.

Configure the fill shape’s clipping direction.

Choose a text format and whether the fill should smooth value changes.

Assign Value whenever the underlying progress changes.


Tips

  • Invert Fill reverses only the visible fill amount. It does not change the value or text.
  • Display Multiplier is useful when the underlying range is 0–1 but the label should show a percentage.

Public API

Use ProgressBar in the Evo.UI namespace.

onValueChanged reports the numeric value, not the smoothed visual amount.

Properties

NameTypeDescription
ValuefloatCurrent progress value.
MinValuefloatLower bound.
MaxValuefloatUpper bound.

Fields

NameTypeDescription
invertFillboolReverses the visual fill amount.
enableSmoothingboolAnimates the fill toward its value.
smoothingDurationfloatTime used for the fill animation.
displayMultiplierfloatMultiplier for display text only.
displayFormatNumberDisplayFormatShared number format.
textFormatstringText template containing 0.
fillRectRectTransformRectTransform containing the fill Graphic.

Methods

NameParametersDescription
SetValueWithoutNotify()float newValueSets progress without its value event.
SetValueInstant()float newValueUpdates the fill immediately and notifies listeners.

Events

NameTypeDescription
onValueChangedUnityEvent<float>Invoked with the changed value.

Example

ProgressBarExample.cs
using UnityEngine;
using Evo.UI;

public class ProgressBarExample : MonoBehaviour
{
    [SerializeField] private ProgressBar target;

    private void Start()
    {
        target.MinValue = 0f;
        target.MaxValue = 1f;
        target.displayMultiplier = 100f;
        target.textFormat = "{0}%";
        target.Value = 0f;
    }

    // Call this from your loading code with a value between 0 and 1.
    public void ReportProgress(float progress)
    {
        target.Value = Mathf.Clamp01(progress);
    }
}

On this page