Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseSee member in base class.
#pragma strict // Required when Using UI elements. public var myScrollRect; public function Start() { //Checks if the ScrollRect called "myScrollRect" is active. if (myScrollRect.IsActive()) { Debug.Log("The Scroll Rect is active!"); } }
using UnityEngine; using System.Collections; using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour { public ScrollRect myScrollRect; public void Start () { //Checks if the ScrollRect called "myScrollRect" is active. if (myScrollRect.IsActive()) { Debug.Log("The Scroll Rect is active!"); } } }