InspectorElement
Create a VisualElement inspector from a SerializedObject.
Read time 7 minutesLast updated 8 days ago
Definition
- Type: Class
- Namespace: UnityEditor.UIElements
- Assembly: UnityEditor
- Inherits from: BindableElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IBindable
public class InspectorElement : BindableElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IBindable
Remarks
Upon Bind(), the InspectorElement will generate PropertyFields inside according to the SerializedProperties inside the bound SerializedObject.
Static Fields
Value | Description |
|---|---|
| customInspectorUssClassName | USS class name of custom inspector elements in elements of this type. |
| debugInternalVariantUssClassName | USS class name of elements of this type, when they are displayed in debug internal mode. |
| debugVariantUssClassName | USS class name of elements of this type, when they are displayed in debug USS mode. |
| iMGUIContainerUssClassName | USS class name of IMGUI containers in elements of this type. |
| iMGUICustomVariantUssClassName | USS class name of elements of this type, when they are displayed in IMGUI custom mode. |
| iMGUIDefaultVariantUssClassName | USS class name of elements of this type, when they are displayed in IMGUI default mode. |
| iMGUIInspectorVariantUssClassName | USS class name of elements of this type, when they are displayed in IMGUI inspector mode. |
| noInspectorFoundVariantUssClassName | USS class name of elements of this type, when no inspector is found. |
| uIECustomVariantUssClassName | USS class name of elements of this type, when they are displayed in UIElements custom mode. |
| uIEDefaultVariantUssClassName | USS class name of elements of this type, when they are displayed in UIElements default mode. |
| uIEInspectorVariantUssClassName | USS class name of elements of this type, when they are displayed in UIElements inspector mode. |
| ussClassName | USS class name of elements of this type. |
Constructors
Constructor | Description |
|---|---|
| InspectorElement() | Initialized a new instance of InspectorElement. |
| InspectorElement(UnityEditor.Editor) | Initialized a new instance of InspectorElement for the specified Editor. |
| InspectorElement(UnityEditor.SerializedObject) | Initialized a new instance of InspectorElement for the specified SerializedObject. |
| InspectorElement(UnityEngine.Object) | Initialized a new instance of InspectorElement for the specified Object. |
Static Methods
Method | Description |
|---|---|
| FillDefaultInspector | Adds default inspector property fields under a container VisualElement. |