public static void BeginArea(Rect screenRect, GUIContent content, GUIStyle style) { GUIUtility.CheckOnGUI(); GUILayoutGroup gUILayoutGroup = GUILayoutUtility.BeginLayoutArea(style, typeof(GUILayoutGroup)); if (Event.current.type == EventType.Layout) { gUILayoutGroup.resetCoords = true; gUILayoutGroup.minWidth = (gUILayoutGroup.maxWidth = screenRect.width); gUILayoutGroup.minHeight = (gUILayoutGroup.maxHeight = screenRect.height); gUILayoutGroup.rect = Rect.MinMaxRect(screenRect.xMin, screenRect.yMin, gUILayoutGroup.rect.xMax, gUILayoutGroup.rect.yMax); } GUI.BeginGroup(gUILayoutGroup.rect, content, style); }
internal static GUILayoutGroup DoBeginLayoutArea(GUIStyle style, Type LayoutType) { return(GUILayoutUtility.BeginLayoutArea(style, LayoutType)); }