Answers for "how to set minvalue of slider in unity"

C#
0

how to set minvalue of slider in unity

using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.

public class Example : MonoBehaviour
{
    public Slider mainSlider;

    void Start()
    {
        // Changes the minimum value of the slider to 10;
        mainSlider.minValue = 10;
    }
}
Posted by: Guest on January-21-2021

Code answers related to "how to set minvalue of slider in unity"

C# Answers by Framework

Browse Popular Code Answers by Language