UnityEngine.GUILayoutUtility.GetAspectRect C# (CSharp) Method

GetAspectRect() public static method

Reserve layout space for a rectangle with a specific aspect ratio.

public static GetAspectRect ( float aspect, GUIStyle style ) : Rect
aspect float The aspect ratio of the element (width / height).
style GUIStyle An optional style. If specified, the style's padding value will be added to the sizes of the returned rectangle & the style's margin values will be used for spacing.
return Rect
        public static Rect GetAspectRect(float aspect, GUIStyle style)
        {
            return DoGetAspectRect(aspect, style, null);
        }

Same methods

GUILayoutUtility::GetAspectRect ( float aspect ) : Rect