Should horizontal scrolling be enabled?
#pragma strict
// Required when Using UI elements.
public var myScrollRect;
public function Start() {
    // Is horizontal scrolling enabled?
    if (myScrollRect.horizontal == true) {
        Debug.Log("Horizontal Scrolling is 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 horizontal scrolling enabled? if (myScrollRect.horizontal == true) { Debug.Log("Horizontal Scrolling is Enabled!"); } } }