Hi,
I’m trying to create a custom editor window but i’m having some problems. My width and height scroll bar has a small wiggle room between values (even if there is no content) needed to extend to them.
Also, when there is too much content and I actually need it to scroll. It stays the same.
Thanks in advance!
[33212-unityimage.png*_|33212] an image of what I mean, and here’s the script:
Vector2 scrollPos;
void OnGUI () {
scrollPos = EditorGUILayout.BeginScrollView (scrollPos,
true,
false,
GUILayout.Width(Screen.width ),
GUILayout.Height(Screen.height - 20));
int posx = 20;
for (int i = 0; i < asm.mylist.Length; i++) {
GUILayout.BeginArea(new Rect(posx, 20, 60, Screen.height - 80 ));
asm.mylist _.volume = GUILayout.VerticalSlider(asm.mylist *.volume, 0, 1);*_
_ EditorGUILayout.LabelField (asm.mylist .gameObject.name);_
* GUILayout.EndArea();*
* posx += 70;*
* }*
* EditorGUILayout.EndScrollView();*
* }*
_*