Hi,
Maybe this was raised before but couldn’t find the answer. It seams that GUILayout.BeginScrollView does not detect GUILayout.BeginArea.
Why the vertical scrollbar is not appearing for the below code ??
When I remove BeginArea & EndArea lines the scrollbar appears.
using UnityEngine;
using UnityEditor;
public class SimpleEditorCode : EditorWindow {
private Vector2 scrollPos;
[MenuItem("Window/Simple Editor")]
public static void Init() {
SimpleEditorCode mainWindow = GetWindow<SimpleEditorCode>();
mainWindow.Show();
}
public void OnGUI() {
scrollPos = GUILayout.BeginScrollView(scrollPos);
GUILayout.BeginArea(new Rect(50, 50, 500, 70));
GUILayout.Button("Test", GUILayout.Width(450));
GUILayout.EndArea();
GUILayout.EndScrollView();
}
}
Any help or link to solution please. Many thanks.