Class InspectorElement
Create a VisualElement inspector from a SerializedObject.
Inherited Members
Namespace: UnityEditor.UIElements
Syntax
public class InspectorElement : BindableElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable
Remarks
Upon Bind(), the InspectorElement will generate PropertyFields inside according to the SerializedProperties inside the bound SerializedObject.
Constructors
InspectorElement()
InspectorElement constructor.
Declaration
public InspectorElement()
InspectorElement(Editor)
InspectorElement constructor.
Declaration
public InspectorElement(Editor editor)
Parameters
Type | Name | Description |
---|---|---|
Editor | editor |
InspectorElement(SerializedObject)
InspectorElement constructor.
Declaration
public InspectorElement(SerializedObject obj)
Parameters
Type | Name | Description |
---|---|---|
SerializedObject | obj | Create a SerializedObject from given obj and automatically Bind() to it. |
InspectorElement(Object)
InspectorElement constructor.
Declaration
public InspectorElement(Object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Create a SerializedObject from given obj and automatically Bind() to it. |
Fields
customInspectorUssClassName
USS class name of custom inspector elements in elements of this type.
Declaration
public static readonly string customInspectorUssClassName
Field Value
Type | Description |
---|---|
String |
debugInternalVariantUssClassName
USS class name of elements of this type, when they are displayed in debug internal mode.
Declaration
public static readonly string debugInternalVariantUssClassName
Field Value
Type | Description |
---|---|
String |
debugVariantUssClassName
USS class name of elements of this type, when they are displayed in debug USS mode.
Declaration
public static readonly string debugVariantUssClassName
Field Value
Type | Description |
---|---|
String |
iMGUIContainerUssClassName
USS class name of IMGUI containers in elements of this type.
Declaration
public static readonly string iMGUIContainerUssClassName
Field Value
Type | Description |
---|---|
String |
iMGUICustomVariantUssClassName
USS class name of elements of this type, when they are displayed in IMGUI custom mode.
Declaration
public static readonly string iMGUICustomVariantUssClassName
Field Value
Type | Description |
---|---|
String |
iMGUIDefaultVariantUssClassName
USS class name of elements of this type, when they are displayed in IMGUI default mode.
Declaration
public static readonly string iMGUIDefaultVariantUssClassName
Field Value
Type | Description |
---|---|
String |
iMGUIInspectorVariantUssClassName
USS class name of elements of this type, when they are displayed in IMGUI inspector mode.
Declaration
public static readonly string iMGUIInspectorVariantUssClassName
Field Value
Type | Description |
---|---|
String |
noInspectorFoundVariantUssClassName
USS class name of elements of this type, when no inspector is found.
Declaration
public static readonly string noInspectorFoundVariantUssClassName
Field Value
Type | Description |
---|---|
String |
uIECustomVariantUssClassName
USS class name of elements of this type, when they are displayed in UIElements custom mode.
Declaration
public static readonly string uIECustomVariantUssClassName
Field Value
Type | Description |
---|---|
String |
uIEDefaultVariantUssClassName
USS class name of elements of this type, when they are displayed in UIElements default mode.
Declaration
public static readonly string uIEDefaultVariantUssClassName
Field Value
Type | Description |
---|---|
String |
uIEInspectorVariantUssClassName
USS class name of elements of this type, when they are displayed in UIElements inspector mode.
Declaration
public static readonly string uIEInspectorVariantUssClassName
Field Value
Type | Description |
---|---|
String |
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
String |
Methods
ExecuteDefaultActionAtTarget(EventBase)
Declaration
protected override void ExecuteDefaultActionAtTarget(EventBase evt)
Parameters
Type | Name | Description |
---|---|---|
EventBase | evt |
Overrides
FillDefaultInspector(VisualElement, SerializedObject, Editor)
Adds default inspector property fields under a container VisualElement
Declaration
public static void FillDefaultInspector(VisualElement container, SerializedObject serializedObject, Editor editor)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | container | The parent VisualElement |
SerializedObject | serializedObject | The SerializedObject to inspect |
Editor | editor | The editor currently used |