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>;
          includeImmutable?: boolean;
          object?: object;
          persistent?: SerializableProperties;
          rootContext?: InspectorContext;
          undoRedo?: UndoRedo;
          window?: EditorWindowBase;
      }
      • OptionalcustomInspector?: CustomInspector<any>

        The inspector that owns the field inspector.

      • OptionalincludeImmutable?: boolean

        Determines whether immutable fields should be included in the 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.

      • OptionalrootContext?: InspectorContext

        The root context. If null, the new context will be its own root.

      • OptionalundoRedo?: UndoRedo

        The UndoRedo stack of the inspector.

      • Optionalwindow?: EditorWindowBase

        The parent window that owns the inspector fields.

    Returns InspectorContext

Properties

focusedField: InspectorFieldBase

The currently focused field.

includeImmutable: boolean

Determines whether immutable fields should be included in the inspector.

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.

rootContext: InspectorContext

The InspectorContext of the root inspector.

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.

Accessors

  • get rootObject(): any
  • Root inspected object. Undo commands should be recorded on this object.

    Returns any