How to temporarily disable the scrollbars of a scrollview?

Hello all,

I’m trying to make an npc dialogue system where, if the text is too long for the box, THEN a scrollbar shows up so you can scroll down to see the rest of the text, but only THEN. I just want it to be a normal, non-scrollable text box if all of the text is able to fit, with no scrollbar visible. I tried to use a script to manually scrollBar.SetActive(false) and vice versa for whenever I need to switch it on or off, but that doesn’t work. It won’t even let me make the scrollbar inactive in the inspector. Any ideas?

Update: I just created an empty gameobject to be the parent of my normal non-scrolling text and I just SetActive(false) when I want to switch between that one and the scrolling text. I don’t know if this is inefficient but it works

1 Like