The direction of the slider, from minimum to maximum value.
#pragma strict // Required when Using UI elements. public class Example { public var mainSlider; public function Start() { //Changes the direction of the slider. if (mainSlider.direction == Slider.Direction.BottomToTop) { mainSlider.direction = Slider.Direction.TopToBottom; } } }
using UnityEngine; using System.Collections; using UnityEngine.UI; // Required when Using UI elements.
public class Example : MonoBehaviour { public Slider mainSlider;
public void Start() { //Changes the direction of the slider. if (mainSlider.direction == Slider.Direction.BottomToTop) { mainSlider.direction = Slider.Direction.TopToBottom; } } }
Did you find this page useful? Please give it a rating: