public static void UpdateWindowsScrollBars() { for (int i = 0; i < CurrentlyOpenWindows.Count; i++) { var window = CurrentlyOpenWindows[i]; if (window.Type == WindowType.TextWindow) { var textWindow = window.WindowContent as TextWindowComponent; var size = new Vector2(textWindow.MainWidget.width, textWindow.MainWidget.height); var diff = textWindow.LastSize - size; if (diff.sqrMagnitude > 0.1f) { GUIUtil.UpdateScrollBar(textWindow.ScrollView); textWindow.LastSize = size; } } } }