EditorInspectorPlugin

Inherits: Reference < Object Plugin for adding custom property editors on inspector.

Description

EditorInspectorPlugin allows adding custom property editors to EditorInspector. can_handle function is called and must return true if the object type is supported. parse_begin will be called, allowing to place custom controls at the beginning of the class. parse_category and parse_property are called for every category and property. They offer the ability to add custom controls to the inspector too. parse_end will be called. On each of these calls, the “add” functions can be called. EditorInspectorPlugin, register it using the EditorPlugin.add_inspector_plugin method first.

Tutorials

  • Inspector plugins

    Methods

    Method Descriptions

  • add_custom_control ( Control control ) Adds a custom control, which is not necessarily a property editor.

  • add_property_editor ( String property, Control editor ) editor control must extend EditorProperty.

  • add_property_editor_for_multiple_properties ( String label, PoolStringArray properties, Control editor ) editor control must extend EditorProperty.

  • bool can_handle ( Object object ) virtual true if this object can be handled by this plugin.

  • parse_begin ( Object object ) virtual Called to allow adding controls at the beginning of the list.

  • parse_category ( Object object, String category ) virtual Called to allow adding controls at the beginning of the category.

  • parse_end ( ) virtual Called to allow adding controls at the end of the list.

  • bool parse_property ( Object object, int type, String path, int hint, String hint_text, int usage ) virtual EditorProperty. Returning true removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.