Hello all,
So i have set up this chat box that works completely great in every aspect except the scrollbar.
I have a Scrollview with a label inside of it(hard coded widths etc for now), and as the number of chat messages passed into the label (during ongui) grow, as does the size of the scannable area by the scrollview. This seems like a pretty good hack for now to get the desired effect of the scrollbar expanding as the quantity of text does.
This works great; but the scrollbar sticks to the top (0,0) on the vector2; in its default behavior.
I can hardcode to vector2 to set itself to the bottom every frame(simply setting vector2.y to be = the amt by which im expanding); but this is where my issue arises. If I do this, the scrollbar will stick at the bottom and not move; as it always seems to be the case that last frames pos and this frames pos are always the same.
I have tried a number of methods (1) Last onGUI frames Vector2.y vs this frames Vector2.y (2) GUI.changed (moving the scrollbar doesn’t seem to set this one off) (3 and etc.)various other super hacky solutions.
Do you guys know a simple way to accomplish this? If I could just detect if the scrollbar has been clicked (or preferably moved); i think the solution will be trivial.
I want my scrollbar to stick to the bottom (like normal chat) until you grab it and pull it off, then it free floats like it does as default behavior. Then when you stick it back to the bottom it stays there again.
This one is baffling me. Thanks everyone for your help in advance :).