Slider

MUIP is using the native slider that comes with Unity UI, but we’ve added some new cool features into it. For scripting, you can use UnityEngine.UI.Slider.

Saving

You can save the last selected value by checking this box. Note that every selector should has its own unique ‘Slider Tag’ value. Otherwise, there might be conflict(s) between sliders.

API / Scripting

using Michsky.UI.ModernUIPack; // namespace

public SliderManager mySlider;

void YourFunction()
{
   mySlider.mainSlider.value = 25f; // Changing slider value
   mySlider.usePercent = false; // Enabling/disabling percent
   mySlider.useRoundValue = false; // Show simplifed value
}

Radial Slider

using Michsky.UI.ModernUIPack; // namespace

public RadialSlider mySlider;

void YourFunction()
{
   mySlider.currentValue = 25f; // Changing slider value
   mySlider.UpdateUI(); // Updating UI
   mySlider.SliderValue = 25f; // Use this if you have problems with currentValue
}
On this page