Slider.SetDirection(Scrollbar.Direction,bool)

매뉴얼로 전환

파라미터

directionThe direction of the slider.
includeRectLayoutsShould the layout be flipped together with the slider direction?

설명

Sets the direction of this slider, optionally changing the layout as well.

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); } }