UGTK cat mascotUGTKengine within an engine Request access

UGTK / Toolkit / Ui Module / Slider System Completed

Ui Module — UGTK

Slider System

Summary

The Slider System manages to change the value of the slider with animation (so the value does not change instantly).


Content


Modules Dependencies

Everything else is Unity UI. Three prefabs ship with the module: Slider (the plain one), CircularSlider (a radial fill) and CircularTimerSlider (a radial fill driven by time).


Setup

  1. Add Mn_SliderController to a GameObject that already has a Slider, or start from one of the three prefabs.
  2. Assign the Slider reference and choose the Update Mode.

How To Use

sliderController.UpdateSliderToValue(0.75f);

The bar then travels to the new value instead of snapping to it, and raises onStartSliderValueChanged when it sets off and onEndSliderValueChanged when it arrives.

Update Mode is the choice that matters, and the two options behave differently in a way that only shows up with real data:

Mode Meaning Behaves like
Speed units per second a fixed rate: a large change takes proportionally longer
Time seconds for the whole trip a fixed duration: every change takes totalTime, whatever its size

For a health bar, Speed is usually right — a big hit should visibly take longer to drain than a scratch. For a loading bar with a known duration, Time is right.

Things worth knowing:


Testing Scene


Technical Info

Path Content
Scripts/Runtime/Mn_SliderController.cs The component: UpdateSliderToValue, the minValue/maxValue/currentValue properties and the two travel events
Scripts/Runtime/E_UpdateMode.cs The two modes, Speed and Time
Scripts/Editor/Mn_SliderControllerEditor.cs Inspector: shows only the field the chosen mode uses, so an irrelevant speed is not left looking meaningful
Prefabs/Slider.prefab Plain horizontal bar
Prefabs/CircularSlider.prefab Radial fill
Prefabs/CircularTimerSlider.prefab Radial fill driven by time

© 2026 Marcello De Bonis. All rights reserved

Real dependenciesOpen in the map →

Depends on 1

Used by 2

Measured from the repository: code references (asmdef) plus prefab and asset GUIDs. Importing this module alone brings in 3 modules in total.