Hello everyone .
I need same help :(.
The beginScrollView function is not working(the scrolling bar doesn’t appear ) if I add GUILayout.MinHeight() to the text area .
Anyone knows why ?
Here is same code
[Is working]
scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUILayout.Width(620), GUILayout.Height(400));
GUILayout.TextArea(ChannelText3, TextViewStyle);
GUILayout.EndScrollView();
[Is not working]
scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUILayout.Width(620), GUILayout.Height(400));
GUILayout.TextArea(ChannelTex3, TextViewStyle,GUILayout.MinHeight(400));
GUILayout.EndScrollView();
Hello 
The documentation says that you need to pass them as an array of options, and I dont think you are doing that, have you checked it?, try passing with 's the parameter
In theory should work like that, haven’t tested it tho.
Nope is not working :(.
Any other sugestions ?
private GUILayoutOption[ ] myarray = { GUILayout.MinHeight(400) };
private GUILayoutOption[ ] myarray2 = { GUILayout.Width(620), GUILayout.Height(400) };
scrollPosition = GUILayout.BeginScrollView(scrollPosition, myarray2);
GUILayout.TextArea(ChannelTex2, TextViewStyle, myarray);
GUILayout.EndScrollView();
You’ll notice in the docs that the options array is marked with the keyword “params”. This means that you can pass as many additional parameters of that type as you like (you can also pass an array if it is more convenient). Your first example should be OK.
Your code looks as though it should work. Would it be possible for you to post the whole script? Maybe the values of some of the other variables (like the text) are making this more complicated than it seems.
Sure I will post a small ex:
using UnityEngine;
using System.Collections;
using System;
public class Test : MonoBehaviour
{
private Rect windowRect=new Rect(400,200, 850, 550);
Vector2 scrollPosition = new Vector2(15, 65);
string textVar=“”;
void OnGUI()
{
windowRect = GUI.Window(1, windowRect, WindowFunction, “Chat Window”);
}
void WindowFunction(int windowID)
{
GUILayout.BeginArea(new Rect(5, 65, 620, 400));
scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUILayout.Width(620), GUILayout.Height(400));
textVar = GUILayout.TextArea(textVar,GUILayout.MinHeight(300));
GUILayout.EndScrollView(); GUILayout.EndArea();
}
}
The code above is not working ,but if you remove “GUILayout.MinHeight(300)” the code works .
Thanks .
If you set the MinHeight value to 400 (ie, the same size as the ScrollView), then the scroll bar appears again, but I’m not sure it gives the effect you want. You could try sending an e-mail to support@unity3d.com about this - if it’s a bug, they will pass it on to the developers.
Yes if you set the min size at least 400 the ScrollView appears but is not working properly . You scroll the “textArea” not the text inside that area .