Class InspectorTestUtility
Utility class to create an Inspector for a given object.
Inherited Members
Namespace: UnityEditor.UIElements.TestFramework
Assembly: Unity.UI.TestFramework.Editor.dll
Syntax
public static class InspectorTestUtility
Methods
CreateDebugInspector(Object)
Creates an InspectorElement for the given object using the default generic inspector,
ignoring any registered custom Editors.
Declaration
public static InspectorElement CreateDebugInspector(Object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj | The Object for which to create an |
Returns
| Type | Description |
|---|---|
| InspectorElement | The |
CreateInspector(Object)
Creates an InspectorElement for the given object using the registered CustomEditor for the object.
Declaration
public static InspectorElement CreateInspector(Object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj | The Object for which to create an |
Returns
| Type | Description |
|---|---|
| InspectorElement | The |
GetEditor(InspectorElement)
Returns the Editor object created to inspect the given object.
Declaration
public static Editor GetEditor(this InspectorElement inspector)
Parameters
| Type | Name | Description |
|---|---|---|
| InspectorElement | inspector | InspectorElement for which to find the Editor object. |
Returns
| Type | Description |
|---|---|
| Editor | The Editor object that the InspectorElement is inspecting. |
GetInspectorContent(InspectorElement)
Returns the VisualElement created by the Editor to display the object's properties.
IMGUI-only inspectors return an IMGUIContainer.
Declaration
public static VisualElement GetInspectorContent(this InspectorElement inspector)
Parameters
| Type | Name | Description |
|---|---|---|
| InspectorElement | inspector |
|
Returns
| Type | Description |
|---|---|
| VisualElement | The VisualElement containing the |