UnityEditor.EditorGUILayout.GetControlRect C# (CSharp) Method

GetControlRect() public static method

Get a rect for an Editor control.

public static GetControlRect ( ) : Rect
return UnityEngine.Rect
        public static Rect GetControlRect(params GUILayoutOption[] options)
        {
            return GetControlRect(true, 16f, EditorStyles.layerMaskField, options);
        }

Same methods

EditorGUILayout::GetControlRect ( bool hasLabel ) : Rect
EditorGUILayout::GetControlRect ( bool hasLabel, float height ) : Rect
EditorGUILayout::GetControlRect ( bool hasLabel, float height, GUIStyle style ) : Rect

Usage Example

示例#1
0
        internal static void Ruler(int w = 2, int padding = 10)
        {
            var r = EGL.GetControlRect(Height(padding + w));

            r.height = w; r.x -= 2; r.width += 6; r.y += padding / 2;
            EditorGUI.DrawRect(r, lightGray);
        }
All Usage Examples Of UnityEditor.EditorGUILayout::GetControlRect