Hi everyone, this is my first time asking a question here.
So… here’s my code(only showing the window, and the OnGUI, and I’m sure most of this is unrelated anyways):
void IdeaWindow(int id)
{
/*GUILayout.BeginHorizontal();
GUILayout.Space(Screen.width /6 - 40);
if(GUILayout.Button ("X")) showWindow = false;
GUILayout.EndHorizontal();*/
GUILayout.BeginHorizontal();
GUILayout.Label("Title: " + IdeaList[curId][0].title);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
GUILayout.Label(" by: " + IdeaList[curId][0].name);
GUILayout.Space(10);
GUILayout.EndHorizontal();
GUILayout.BeginVertical ();
scrollposition = GUILayout.BeginScrollView(scrollposition);
GUILayout.Label (IdeaList[curId][0].text);
if(IdeaList[curId].Count > 1){
for(int i = 1; i < IdeaList[curId].Count; i++){
GUILayout.BeginVertical ();
if(i==1) GUILayout.Label ("+++++++++++++");
GUILayout.Label (IdeaList[curId]*.text);*
-
GUILayout.EndVertical();*
_ GUILayout.Label ("by: " + IdeaList[curId].name);_
* GUILayout.BeginHorizontal();*
* GUILayout.Label(“-----------------”);*
* GUILayout.Space(10);*
* GUILayout.EndHorizontal();*
* }*
* }*
* GUILayout.Space(10);*
* GUILayout.EndScrollView ();*
* GUILayout.EndVertical ();*
* GUILayout.BeginHorizontal ();*
* GUILayout.BeginVertical();*
* GUILayout.Space (10);*
* newComment = GUILayout.TextField(newComment);*
* GUILayout.EndVertical();*
* GUILayout.Space (10);*
* if(newComment.Length >= 1){*
* if(GUILayout.Button(“Post New Reply”)){*
* if(Network.peerType == NetworkPeerType.Server){*
* IdeaEntry entry = new IdeaEntry();*
* entry.name = PlayerPrefs.GetString (“playerName”);*
* entry.text = newComment;*
* IdeaList[curId].Add(entry);*
* } else networkView.RPC (“ApplyNewComment”, RPCMode.Server, PlayerPrefs.GetString (“playerName”), newComment, curId);*
* newComment = “”;*
* if(Network.peerType == NetworkPeerType.Client) IdeaList = new List<List>();*
* networkView.RPC (“RequestIdeaList”, RPCMode.Server);*
* }*
* }*
* GUILayout.EndHorizontal();*
* }*
void OnGUI()
* {*
* if (showWindow){*
* if (IdeaList.Count > 50)*
* IdeaList.RemoveAt(0);*
* scrollposition.y = 1000000;*
* window = GUI.Window (6, window, IdeaWindow, “”);*
* }*
* }*
It compiles, it runs. In fact, I basically copied this from my other script, for a bulletin board, and in there, the scrolling works just fine.
Anyways, so the problem is, the scrollbar shows up after several comments fills the window.
But the scroll just doesn’t scroll…
I checked similar questions and none of them seemed to be the same as my situation.
Thanks for reading.