direction | The direction of the slider. |
includeRectLayouts | Should the layout be flipped together with the slider direction? |
Sets the direction of this slider, optionally changing the layout as well.
#pragma strict // Required when Using UI elements. public class Example { public var mainSlider; public function Start() { mainSlider.SetDirection(Slider.Direction.LeftToRight, false); } }
using UnityEngine; using System.Collections; using UnityEngine.UI; // Required when Using UI elements.
public class Example : MonoBehaviour { public Slider mainSlider; public void Start() { mainSlider.SetDirection (Slider.Direction.LeftToRight, false); }
}