Class InspectorContext

The InspectorContext class provides information used by a InspectorFormLayoutSection to pass context data to its InspectableField instances.

Constructors

  • Creates a new context with user-provided persistent property storage.

    Parameters

    • Optionaloptions: {
          customInspector?: CustomInspector<any>;
          object?: object;
          persistent?: SerializableProperties;
          undoRedo?: UndoRedo;
          window?: EditorWindowBase;
      }
      • OptionalcustomInspector?: CustomInspector<any>

        The inspector that owns the field inspector.

      • Optionalobject?: object

        Object that inspector fields are editing.

        This is also the object that we use to create undo operations for.

      • Optionalpersistent?: SerializableProperties

        Existing object into which to inspectable fields can store persistent data.

      • OptionalundoRedo?: UndoRedo

        The UndoRedo stack of the inspector.

      • Optionalwindow?: EditorWindowBase

        The parent window that owns the inspector fields.

    Returns InspectorContext

Properties

inspectedObject: any

Object that inspector fields are editing.

inspector: CustomInspector<any>

The inspector that owns the InspectorFieldContainer.

isAlwaysExpandingChildren: boolean

True to always expand children.

A set of properties that the inspector can read/write. They will be persisted even after the inspector is closed and restored when it is re-opened.

undoRedo: UndoRedo

The undoRedo stack to which commands should be recorded to. If null, no undo/redo commands are recorded.

The window that owns the inspector fields.