Legacy Documentation: Version 5.4
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ScrollRect.vertical

public bool vertical;

Description

Should vertical scrolling be enabled?

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

public class ExampleClass : MonoBehaviour { public ScrollRect myScrollRect; public void Start () { // Is Vertical scrolling enabled? if(myScrollRect.vertical == true) { Debug.Log ("Vertical Scrolling is Enabled!"); } } }