EditorGUI

class in UnityEditor

Switch to Manual

Description

These work pretty much like the normal GUI functions - and also have matching implementations in EditorGUILayout.

Static Variables

actionKeyIs the platform-dependent "action" modifier key held down? (Read Only)
indentLevelThe indent level of the field labels.
showMixedValueMakes the following controls give the appearance of editing multiple different values.

Static Functions

BeginChangeCheckПроверяет, был ли изменен какой-либо контрол внутри блока кода.
BeginDisabledGroupСоздает группу контролов, которые могут быть выключены.
BeginPropertyСоздает обертку для свойства, полезно для создания обычных контролов GUI, работающих с SerializedProperty.
BoundsFieldMakes Center and Extents field for entering a Bounds.
BoundsIntFieldMakes Position and Size field for entering a BoundsInt.
CanCacheInspectorGUIGet whether a SerializedProperty's inspector GUI can be cached.
ColorFieldMakes a field for selecting a Color.
CurveFieldMakes a field for editing an AnimationCurve.
DelayedDoubleFieldMakes a delayed text field for entering doubles.
DelayedFloatFieldMakes a delayed text field for entering floats.
DelayedIntFieldMakes a delayed text field for entering integers.
DelayedTextFieldMakes a delayed text field.
DoubleFieldMakes a text field for entering doubles.
DrawPreviewTextureРисует текстуру внутри прямоугольника.
DrawRectDraws a filled rectangle of color at the specified position and size within the current editor window.
DrawTextureAlphaРисует альфа-канал текстуры внутри прямоугольника.
DropdownButtonMakes a button that reacts to mouse down, for displaying your own dropdown content.
DropShadowLabelРисует текст с отбрасываемой тенью.
EndChangeCheckЗавершает проверку изменений, начатую с BeginChangeCheck ().
EndDisabledGroupЗавершает выключенную группу, начатую с BeginDisabledGroup.
EndPropertyЗавершает обертку свойства, начатую с BeginProperty.
EnumFlagsFieldDisplays a menu with an option for every value of the enum type when clicked. An option for the value 0 with name "Nothing" and an option for the value ~0 (that is, all bits set) with the name "Everything" are always displayed at the top of the menu. The names for the values 0 and ~0 can be overriden by defining these values in the enum type.
EnumPopupMakes an enum popup selection field.
FloatFieldMakes a text field for entering floats.
FocusTextInControlПереносит фокус клавиатуры к названному текстовому полю и начинает редактирование содержимого.
FoldoutMakes a label with a foldout arrow to the left of it.
GetPropertyHeightВозвращает значение высоты, необходимое для контрола PropertyField.
GradientFieldMakes a field for editing a Gradient.
HandlePrefixLabelMakes a label for some control.
HelpBoxMakes a help box with a message to the user.
InspectorTitlebarMakes an inspector-window-like titlebar.
IntFieldMakes a text field for entering integers.
IntPopupMakes an integer popup selection field.
IntSliderMakes a slider the user can drag to change an integer value between a min and a max.
LabelFieldMakes a label field. (Useful for showing read-only info.)
LayerFieldMakes a layer selection field.
LongFieldMakes a text field for entering long integers.
MaskFieldMakes a field for masks.
MinMaxSliderMakes a special slider the user can use to specify a range between a min and a max.
MultiFloatFieldMakes a multi-control with text fields for entering multiple floats in the same line.
MultiIntFieldMakes a multi-control with text fields for entering multiple integers in the same line.
MultiPropertyFieldMakes a multi-control with several property fields in the same line.
ObjectFieldMakes an object field. You can assign objects either by drag and drop objects or by selecting an object using the Object Picker.
PasswordFieldMakes a text field where the user can enter a password.
PopupMakes a generic popup selection field.
PrefixLabelMakes a label in front of some control.
ProgressBarMakes a progress bar.
PropertyFieldUse this to make a field for a SerializedProperty in the Editor.
RectFieldMakes an X, Y, W, and H field for entering a Rect.
RectIntFieldMakes an X, Y, W, and H field for entering a RectInt.
SelectableLabelMakes a selectable label field. (Useful for showing read-only info that can be copy-pasted.)
SliderMakes a slider the user can drag to change a value between a min and a max.
TagFieldMakes a tag selection field.
TextAreaMakes a text area.
TextFieldMakes a text field.
ToggleMakes a toggle.
ToggleLeftMakes a toggle field where the toggle is to the left and the label immediately to the right of it.
Vector2FieldMakes an X and Y field for entering a Vector2.
Vector2IntFieldMakes an X and Y integer field for entering a Vector2Int.
Vector3FieldMakes an X, Y, and Z field for entering a Vector3.
Vector3IntFieldMakes an X, Y, and Z integer field for entering a Vector3Int.
Vector4FieldMakes an X, Y, Z, and W field for entering a Vector4.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961