Version: 2022.3
public static float fieldWidth ;

描述

为 Editor GUI 控件字段保留的最小宽度(以像素为单位)。

大多数 Editor GUI 控件由标签和控制字段本身组成。字段的最小宽度由 fieldWidth 值控制。字段通常看起来比最小宽度要宽,因为 Editor GUI 控件通常设置为占用一个 Rect,该 Rect 会扩展以填充可用的水平空间。在此 Rect 中,该字段将占用 EditorGUIUtility.labelWidth 未使用的所有空间。

fieldWidth 还控制 EditorGUI.Slider 控件内文本字段的宽度。


Did you find this page useful? Please give it a rating: