RadialProgress
A ring or pie that fills with a value from 0 to 1: a cooldown ring, a charge meter, a shield gauge. It fills clockwise, anticlockwise or both ways, and a hole in the middle makes it a ring. Goes under a Canvas.
On this page
Add it
Add component → RadialProgressComponent in the Inspector, on the node that should carry it.
From a script
A script on the same node writes these fields by name. RadialProgressComponent is the name to pass.
rgs
set_number("RadialProgressComponent", "value", 1.0);
set_number("RadialProgressComponent", "start", -90.0);
set_number("RadialProgressComponent", "inner_radius", 0.0);
set_colour("RadialProgressComponent", "color", vec4(1.0, 1.0, 1.0, 1.0)); Fields
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| Value | value | number, 0 to 1, step 0.01 | 1 | How full it is. |
| Start | start | number | -90 ° | Degrees clockwise from three o'clock. |
| Direction | direction | one of Clockwise, CounterClockwise, Both | Clockwise | Which way the fill grows. |
| Inner Radius | inner_radius | number, 0 to 0.95, step 0.01 | 0 | The hole in the middle, as a fraction of the outer radius. |
| Segments | segments | number, 3 to 512 | 64 | Segments a full turn would use. |
| Color | color | colour | #ffffff | Colour of the ring or pie, including transparency. |