Search Unity

How do you disable Scrolling?

Discussion in 'UGUI & TextMesh Pro' started by FirebladeBR, Nov 17, 2014.

  1. FirebladeBR

    FirebladeBR

    Joined:
    Apr 21, 2014
    Posts:
    65
    Hi Guys,

    I have created an empty gameobject and then added the scroollrect and mask, and then the content.

    Now I want to disable the scroll of the content? I did not find any option for that in the inspector. I would help if I could do it via script, as sometimes it would be disabled and other times not.

    Thanks,

    FirebladeBR
     
  2. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Code (csharp):
    1. GetComponent<ScrollRect>().enabled = false;
     
  3. FirebladeBR

    FirebladeBR

    Joined:
    Apr 21, 2014
    Posts:
    65
    THanks, I think I also found that there is also a horizontal and vertical option for enabling scrolling.