Scroll view, can figure out how to get it to work

if(isShowing == true){
		scroll = GUI.BeginScrollView(new Rect(Screen.width / 2 + (buttonWidth / 2), Screen.height / 2 + 30, buttonWidth, Screen.height / 2 + 30), scroll, new Rect(0, 0, buttonWidth, 1000));
		for (int i = 0; i < avaRes.Length; i++) {
			Resolution resolution = avaRes[i];
			int verticalPosition = startVerticalPosition + i * (verticalMargin + buttonHeight);
			
			if (GUI.Button(new Rect(horizontalPosition, verticalPosition, buttonWidth, buttonHeight), resolution.width.ToString() + "x" + resolution.height.ToString())) {
			isShowing = false;
			Screen.SetResolution(resolution.width, resolution.height, true);
			break;
		}
	}
	
	GUI.EndScrollView();
}

is what i have, and it isnt working. i have it therefor overflow of screen resolutions for the current resolution. it isn working right. before i did it, it worked fine, but it doesnt anymore, because of the ScrollView

anyone?

I’m not sure what your question is, or the purpose of the script. Do you mean that you want a scrollbar to appear if the game is larger than the screen resolution? If that’s the case… doesn’t the operating system to that on its own?

it is supposed to enable the player access to the screen resolution in-game. what happens if the resolution is too low, some of the buttons are off screen

Ah. Well, I don’t have much experience with scrollbars. But, I would also recommend either manually setting the resolution yourself (forcing the player to play with the correct size), or setting the position of your buttons relative to Screen.width and Screen.height.

Sorry I’m not much help with your approach.

anyone?

some one?