Would you use Scroll views as a chat window or would you use something else? Also is there a way to only limit it to scroll up and down?
You can limit a ScrollView to scroll only up and down by limiting the view rectangle so that it is never wider than the ScrollView rectangle.
This might make a good chat window, but it would depend on exactly how you want the chat to work. Have a look at this post for a suggestion about how to scroll the text.
I was gonna try to use a TextArea to but theres realy no way to scroll it. Heres what i got so far if you wana take a look at it. Im gonna look at the stuff within it to see if theres any way to scroll it.
Vector2 Cpos = Vector2.zero;
Cpos = GUI.BeginScrollView(new Rect(6,20,285,150),Cpos,new Rect(6,20,275,250));
MsgString = GUI.TextArea(new Rect(6,20,260,300),MsgString);
GUI.EndScrollView();
well if i use scrollto function before the endscrollview then it scrolls to the buttom but for some reason i can use the scroll bars its not letting me move them.
I know this is a little off topic but for some reason i cant edit a password field nor a text field im gonna assume. I am puting the chat in 1 window and the password ffield in another. I followed the script reference. Is anyone else having these problems?
Do you mean that when you try to edit the text, nothing happens? If so, check that you are assigning the string returned by the GUI function to a variable and also passing that same variable into the function:-
var text: String;
function OnGUI() {
text = GUI.TextField(textRect, text);
}
You also need to feed the return value back like this when using scrollviews, sliders, etc.
i had the string in the actual function instead of outside thats why it wouldnt let me edit it.