Hello, I’m looking for a way to add a scroll bar onto a box in my GUI.
Here is my box:
function OnGUI () {
GUI.Box (Rect ((Screen.width/12),(Screen.height/12),(Screen.width - (Screen.width/6)),(Screen.height - (Screen.height/6))), story);
}
The box appears where I want it just fine, but now I want to add a scroll bar to the right side of the box. This is because I will sometimes have large amounts of text within the box at one time. I want to have the scroll-able area reach just as far down as my string is (story). How can this be done?
Also if there is a way to make it so the scroll bar isn’t visable when there isn’t enough text in the box to require the scrollbar to see it all, I’d love to hear of it. Thanks!