I have chat (in TextArea), that I need to scroll down whenever there are too many messages. I tried adding ScrollView, but that isn’t what I need. So I tried to use ScrollBar and Slider, but I couldn’t make the chat scrollable with it. Can anyone tell me how can I “connect” the ScrollBar/Slider with the chat.
This is the code I have for the chat (without the code that showes how I update the chat with new messages):
public string Chat;
public string MsgChat; // msg to be sent to the chat
void OnGUI() {
GUI.TextArea( new Rect( 10, 100, 500, 400 ), Chat );
MsgChat = GUI.TextField( new Rect( 10, 510, 500, 20 ), MsgChat );
}