class in UnityEditor
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
CloseThese work pretty much like the normal GUI functions - and also have matching implementations in EditorGUILayout.
actionKey | Is the platform-dependent "action" modifier key held down? (Read Only) |
indentLevel | The indent level of the field labels. |
showMixedValue | Makes the following controls give the appearance of editing multiple different values. |
BeginChangeCheck | Starts a new code block to check for GUI changes. |
BeginDisabledGroup | Create a group of controls that can be disabled. |
BeginFoldoutHeaderGroup | Make a label with a foldout arrow to the left of it. |
BeginProperty | Create a Property wrapper, useful for making regular GUI controls work with SerializedProperty. |
BoundsField | Makes Center and Extents field for entering a Bounds. |
BoundsIntField | Makes Position and Size field for entering a BoundsInt. |
ColorField | Makes a field for selecting a Color. |
CurveField | Makes a field for editing an AnimationCurve. |
DelayedDoubleField | Makes a delayed text field for entering doubles. |
DelayedFloatField | Makes a delayed text field for entering floats. |
DelayedIntField | Makes a delayed text field for entering integers. |
DelayedTextField | Makes a delayed text field. |
DoubleField | Makes a text field for entering doubles. |
DrawPreviewTexture | Draws the texture within a rectangle. |
DrawRect | Draws a filled rectangle of color at the specified position and size within the current editor window. |
DrawTextureAlpha | Draws the alpha channel of a texture within a rectangle. |
DropdownButton | Makes a button that reacts to mouse down, for displaying your own dropdown content. |
DropShadowLabel | Draws a label with a drop shadow. |
EndChangeCheck | Ends a code block and checks for any GUI changes. |
EndDisabledGroup | Ends a disabled group started with BeginDisabledGroup. |
EndFoldoutHeaderGroup | Closes a group started with BeginFoldoutHeaderGroup. Additional resources: EditorGUILayout.BeginFoldoutHeaderGroup. |
EndProperty | Ends a Property wrapper started with BeginProperty. |
EnumFlagsField | Displays 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. |
EnumPopup | Makes an enum popup selection field. |
FloatField | Makes a text field for entering floats. |
FocusTextInControl | Move keyboard focus to a named text field and begin editing of the content. |
Foldout | Makes a label with a foldout arrow to the left of it. |
GetPropertyHeight | Get the height needed for a PropertyField control. |
GradientField | Makes a field for editing a Gradient. |
HandlePrefixLabel | Makes a label for some control. |
HelpBox | Makes a help box with a message to the user. |
InspectorTitlebar | Makes an inspector-window-like titlebar. |
IntField | Makes a text field for entering integers. |
IntPopup | Makes an integer popup selection field. |
IntSlider | Makes a slider the user can drag to change an integer value between a min and a max. |
LabelField | Makes a label field. (Useful for showing read-only info.) |
LargeSplitButtonWithDropdownList | Creates a large button that contains a regular button section and an arrow to open a dropdown menu. |
LayerField | Makes a layer selection field. |
LinkButton | Make a clickable link label. |
LogarithmicIntSlider | Makes a text field for entering an integer on a logarithmic scale. |
LongField | Makes a text field for entering long integers. |
MaskField | Makes a field for masks. |
MinMaxSlider | Makes a special slider the user can use to specify a range between a min and a max. |
MultiFloatField | Makes a multi-control with text fields for entering multiple floats in the same line. |
MultiIntField | Makes a multi-control with text fields for entering multiple integers in the same line. |
MultiPropertyField | Makes a multi-control with several property fields in the same line. |
ObjectField | Makes an object field. You can assign objects either by drag and drop objects or by selecting an object using the Object Picker. |
PasswordField | Makes a text field where the user can enter a password. |
Popup | Makes a generic popup selection field. |
PrefixLabel | Makes a label in front of some control. |
ProgressBar | Makes a progress bar. |
PropertyField | Use this to make a field for a SerializedProperty in the Editor. |
RectField | Makes an X, Y, W, and H field for entering a Rect. |
RectIntField | Makes an X, Y, W, and H field for entering a RectInt. |
RenderingLayerMaskField | Makes a rendering layer selection field. |
SelectableLabel | Makes a selectable label field. (Useful for showing read-only info that can be copy-pasted.) |
Slider | Makes a slider the user can drag to change a value between a min and a max. |
TagField | Makes a tag selection field. |
TextArea | Makes a text area. |
TextField | Makes a text field. |
Toggle | Makes a toggle. |
ToggleLeft | Makes a toggle field where the toggle is to the left and the label immediately to the right of it. |
Vector2Field | Makes an X and Y field for entering a Vector2. |
Vector2IntField | Makes an X and Y integer field for entering a Vector2Int. |
Vector3Field | Makes an X, Y, and Z field for entering a Vector3. |
Vector3IntField | Makes an X, Y, and Z integer field for entering a Vector3Int. |
Vector4Field | Makes an X, Y, Z, and W field for entering a Vector4. |
hyperLinkClicked | Event used to react on clicks on a text hyperlink part. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.