Hi I am trying to make a chat window for my multiplayer Game. I have done everything except for the fact that the window where the text is placed is always in the top left hand corner of the screen and it is driving me nuts.
Vector2 scrollPosition = new Vector2(5698, 312); // I have put an abstract value here to show that this values does not matter at all and no matter what value I write here it does the same thing.
// and this is the text inside OnGui()
scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUILayout.Width(450), GUILayout.Height(450));
foreach (var cm in chatHistory)
{
GUILayout.Label(cm);
}
GUILayout.EndScrollView();
This bow always ends up being placed in the top left hand corner of the screen and I do not understand why. how can I tell the Scrollview to have a certain x and Y coordinate and a certain width and height.
thanks.