Logo
UI Elements

Radial Slider

A circular slider built on top of Interactive

Overview

Radial Slider extends Interactive and provides a circular input control for selecting a value by dragging around a ring. The slider updates its fill image and handle position based on user input or code driven changes.

Transition Effects

Interactive components support state based transitions through the Styler Object system. This includes color changes on hover, click, and other interactions. For more information, see the Styler page.

Interactive Features

Radial Slider inherits all event, audio, ripple, and trail functionality from Interactive.
For more information, see the Interactive page.


Properties

Slider Settings

NameTypeDescription
MinValuefloatMinimum slider value
MaxValuefloatMaximum slider value
ValuefloatCurrent value (clamped between Min and Max)
WholeNumbersboolIf true, rounds value to nearest integer
invokeAtStartboolInvokes onValueChanged when Start runs

Radial Settings

NameTypeDescription
angleRangefloatTotal degrees the slider covers
startAnglefloatBase rotation offset
handleOffsetfloatExtra radius offset for the handle
clockwiseboolMoves slider clockwise instead of CCW
allowContinuousDragboolAllows infinite drag without range blocking

Formatting

NameTypeDescription
displayMultiplierfloatMultiplier applied before displaying value
displayFormatSlider.DisplayFormatFixed or thousands formatting
textFormatstringFormat containing 0 placeholder

References

NameTypeDescription
handleRectRectTransformThe draggable handle
fillImageImageImage used to display radial fill
valueTextTMP_TextOutput text for current value
valueInputTMP_InputFieldInput for manually typing values

Events

NameTypeDescription
onValueChangedUnityEvent<float>Invoked when value changes

Public Methods

NameParametersDescription
SetValue(float)floatSets value and updates visuals
SetValueWithoutNotify(float)floatChanges value without firing onValueChanged
SetState(state, instant)InteractionState, boolSets new interactive state
SetInteractable(value)boolToggles interactable state

Code Example

RadialSliderExample.cs
using UnityEngine;
using Evo.UI;

public class RadialSliderExample : MonoBehaviour
{
    public RadialSlider slider;

    void Start()
    {
        // Setup values
        slider.MinValue = 0;
        slider.MaxValue = 100;
        slider.Value = 40;

        // Radial config
        slider.angleRange = 270f;
        slider.startAngle = 270f;
        slider.clockwise = true;

        // Display settings
        slider.displayMultiplier = 1f;
        slider.textFormat = "{0}%";

        // Add listener
        slider.onValueChanged.AddListener(val =>
        {
            Debug.Log("Radial value changed: " + val);
        });

        // Set state
        slider.SetState(InteractionState.Normal);
        slider.SetInteractable(true);
    }
}

On this page