UnityEngine.GUILayoutUtility.Layout C# (CSharp) Method

Layout() static private method

static private Layout ( ) : void
return void
        internal static void Layout()
        {
            if (current.topLevel.windowID == -1)
            {
                current.topLevel.CalcWidth();
                current.topLevel.SetHorizontal(0f, Mathf.Min(((float) Screen.width) / GUIUtility.pixelsPerPoint, current.topLevel.maxWidth));
                current.topLevel.CalcHeight();
                current.topLevel.SetVertical(0f, Mathf.Min(((float) Screen.height) / GUIUtility.pixelsPerPoint, current.topLevel.maxHeight));
                LayoutFreeGroup(current.windows);
            }
            else
            {
                LayoutSingleGroup(current.topLevel);
                LayoutFreeGroup(current.windows);
            }
        }

Usage Example

コード例 #1
0
        internal static void EndGUI(int layoutType)
        {
            try
            {
                if (Event.current.type == EventType.Layout)
                {
                    switch (layoutType)
                    {
                    case 0:     // kNoLayout
                        break;

                    case 1:     // kGameLayout
                        GUILayoutUtility.Layout();
                        break;

                    case 2:     // kEditorLayout
                        GUILayoutUtility.LayoutFromEditorWindow();
                        break;
                    }
                }
                GUILayoutUtility.SelectIDList(s_OriginalID, false);
                GUIContent.ClearStaticCache();
            }
            finally
            {
                Internal_ExitGUI();
            }
        }
All Usage Examples Of UnityEngine.GUILayoutUtility::Layout