ReadonlyactionsList of actions created and updated by the _inspector.
ReadonlycontextContext of the object we're inspecting, if provided.
ReadonlyfieldsList of fields created and updated by the _inspector.
ReadonlyformThe field container.
An InspectorProperty that represents a parent of the inspector. Can be null.
If set to true, the field _inspector will perform lazy refreshing and will only trigger the refresh methods of
it's attached fields if notifyNeedsRefresh is called.
A flag that indicates if the inspector field _inspector needs to be refreshed since the last call to refresh.
The parent layout. Only available for types such as InlineObjectInspectorField.
Static ReadonlypersistDetermines if label widths are persisted in the LocalOnlyEditorSettings.
Determines if the user is allowed to resize the inspector or if the label is at a fixed position.
The maximum label width as a percentage of the whole element width. Used only when deducing a label width.
Adds a custom action which will invoke the given callback function when clicked by the user.
Name of the field.
Callback invoked when the action is triggered.
Optionalstyle: InspectableActionStyle | Partial<InspectableActionStyle>Contains various styling parameters to be used with the action like value tooltip or category.
ProtectedaddCreates a new action acting on the provided method.
Unique name representing the action field.
Title to display on the action as.
Method used to access trigger the action when clicked.
Adds a condition that determines whether a field will be shown or hidden.
Name of the field the condition applies to.
The callback that returns true if the field should be shown, false otherwise.
Optionaltype: EnumValue<InspectorFieldConditionalType, number>Which InspectorField member should be controlled by the new Conditional.
Adds a custom inspectable field with a custom getter and setter.
The field type being inspected.
Name of the field.
Method that returns the current value of the field.
Method that sets a new value of the field.
Optionalinline: booleanIf true, will inline the field parameters identical to the InlineAttribute.
OptionalfnOverrideCallback: InspectorOverrideCallbackOptional callback allowing the caller to override how is the field created.
A reference to the added inspector field object.
Adds a custom inspectable field with a custom getter and setter and manually specified InspectablePropertyDecoration.
Name of the field.
Method that returns the current value of the field.
Method that sets a new value of the field.
Contains various styling parameters to be used with the Field like value range, category or tooltip.
OptionalfnOverrideCallback: InspectorOverrideCallbackOptional callback allowing the caller to override how is the field created.
A reference to the added inspector field object.
Creates the default inspector UI for the provided object.
Object whose fields to create the UI for.
OptionalfilterType: TypeIf not null, the added fields will be limited to this particular type (not including any base types the actual object type might be a part of). If null, then fields for the entire class hierarchy of the provided object's type will be created.
OptionalfnOverrideCallback: InspectableObjectFieldCallback<T>Optional callback that allows you to override the look of individual fields in the object. If non-null the callback will be called with information about every field in the provided object. If the callback returns non-null that inspectable field will be used for drawing the UI, otherwise the default inspector field type will be used.
OptionalfnOnFilterField: InspectableObjectFieldFilterCallback<T>Optional callback that allows you to filter fields in the object. If non-null the callback will be called with information about every field in the provided object. If the callback returns false, the field will not be added to the inspector.
Adds a custom inspectable field of the specified name in the inspectableObject.
Name of the field.
The InspectableObject that contains the field.
OptionalfnOverrideCallback: InspectorOverrideCallbackOptional callback allowing the caller to override how is the field created.
A reference to the added inspector field object.
Adds a custom inspectable field backed by a InspectableProperty.
Name of the field.
Property used to access the field contents.
OptionalfnOverrideCallback: InspectorOverrideCallbackOptional callback allowing the caller to override how is the field created.
A reference to the added inspector field object.
Adds a UIHorizontalLayout to the field layout.
The layout.
Creates the default inspector UI for the provided InspectableObject.
Object whose fields to create the UI for.
OptionalfilterType: TypeIf specified, the added fields will be limited to this particular type (not including any base types the actual object type might be a part of). If null, then fields for the entire class hierarchy of the provided object's type will be created.
OptionalfnOverrideCallback: InspectableObjectFieldCallback<T>Optional callback that allows you to override the look of individual fields in the object. If non-null the callback will be called with information about every field in the provided object. If the callback returns non-null that inspectable field will be used for drawing the UI, otherwise the default inspector field type will be used.
OptionalfnOnFilterField: InspectableObjectFieldFilterCallback<T>Optional callback that allows you to filter fields in the object. If non-null the callback will be called with information about every field in the provided object. If the callback returns false, the field will not be added to the inspector.
Defines a condition that determines whether a category panel is open or closed.
The category name whose panel is being controlled.
The callback that returns true if the category should be open, false otherwise.
A secondary callback that will be called each time the user has toggled the category panel manually.
Optionaltype: EnumValue<InspectorFieldCategoryConditionalType, number>The type of conditional to be added to for the category.
Adds a UIVerticalLayout to the field layout.
The layout.
Opens up a new category. Any new fields will be parented to this category. Category must be closed by calling endCategory or by calling this method with a new category.
Name of the category.
OptionalaccessoryElement: UIElementBaseAn optional UIElementBase to use as foldout accessory. If the category was already constructed the accessory will not be used.
Ends the category started with beginCategory.
Finds a field by it's path.
The path of the field to be located.
The field at the given path, if it exists.
Checks if contents of the inspector fields have been modified, and updates them if needed.
OptionalisForced: booleanForces the UI fields to display the latest values assigned on the object.
OptionalstartingIndex: numberThe index to start refreshing the items. This is mostly useful for inline inspectors.
State representing was anything modified between two last calls to refresh.
Checks if contents of the inspector fields have been modified, and updates them if needed.
Flags that determine how fields should be refreshed.
OptionalstartingIndex: numberThe index to start refreshing the items. This is mostly useful for inline inspectors.
State representing was anything modified between two last calls to refreshWithFlags.
Opens up a new category by calling beginCategory and calls action. After
callback returns, the category is closed by calling endCategory.
The category name. All fields created inside action will be added to this category.
A callback to be called after the category is created and before it is closed.
OptionalaccessoryElement: UIElementBaseAn optional UIElementBase to use as foldout accessory. If the category was already constructed the accessory will not be used.
StaticgetGets the last saved value for label widths of the given key.
The key to fetch the label width value for.
Optionaldepth: numberThe depth level to fetch the label width for.
The label width as a percentage of the whole inspector width.
StaticsetSets and saves a new value for label widths of the given key.
The key to set the label width value for.
The label width as a percentage of the whole inspector width.s
Optionaldepth: numberThe depth level to set the label width for.
The InspectorFieldContainer class provider help functions to create field registrations for an inspector.
Note
To create an inspector that can be easily placed into a UILayout it's recommended to use UIObjectInspector instead.