Can anyone detect any obvious problems with the following script?
int loadButtonPos = 30;
string[] loadFilePaths = Directory.GetFiles(Application.dataPath + "/models/");
scrollPosition = GUI.BeginScrollView (new Rect (15,0,loadPopup.width - 30,loadPopup.height - 30), scrollPosition, new Rect (0, 0, 220, 200), false, true);
for (int i = 0; i < loadFilePaths.Length; i++) {
string curFile = Path.GetFileNameWithoutExtension(loadFilePaths*);*
*if (GUI.Button(new Rect(15, loadButtonPos, 200, 10), curFile)) {*
*showLoadPopup = false;*
*LoadData(curFile);*
*saveFileName = curFile;*
*}*
*loadButtonPos+=35;*
*}*
*GUI.EndScrollView ();*
*```*
*<p>When I run it, my vertical scroll bar doesn't show up (even when I have far more elements invisible than onscreen) unless I set alwaysShowVerticalScrollbar to true.</p>*
*<p>When I do that, my scrollview jitters at a very high speed between the top and bottom of the scrollview. </p>*
*<p>I can't see what's wrong with it, so I hoped somebody else with a non-steamed brain could help.</p>*
*<p>Thanks - Elliot Bonneville</p>*