UnityEngine.GUILayoutUtility.DoGetAspectRect C# (CSharp) Method

DoGetAspectRect() private static method

private static DoGetAspectRect ( float aspect, GUIStyle style, GUILayoutOption options ) : Rect
aspect float
style GUIStyle
options GUILayoutOption
return Rect
        private static Rect DoGetAspectRect(float aspect, GUIStyle style, GUILayoutOption[] options)
        {
            switch (Event.current.type)
            {
                case EventType.Layout:
                    current.topLevel.Add(new GUIAspectSizer(aspect, options));
                    return kDummyRect;

                case EventType.Used:
                    return kDummyRect;
            }
            return current.topLevel.GetNext().rect;
        }

Usage Example

コード例 #1
0
 public static Rect GetAspectRect(float aspect, GUIStyle style, params GUILayoutOption[] options)
 {
     return(GUILayoutUtility.DoGetAspectRect(aspect, GUIStyle.none, options));
 }
All Usage Examples Of UnityEngine.GUILayoutUtility::DoGetAspectRect