diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index f6f51df7c0..51ef739876 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -92,6 +92,7 @@ Registers a new export plugin. Export plugins are used when the project is being exported. See [EditorExportPlugin] for more information. + See [method add_inspector_plugin] for an example of how to register a plugin. @@ -100,6 +101,9 @@ + Registers a new import plugin. Import plugins are used to add a new [Resource] which can be imported. See [EditorImportPlugin] for more information. + [b]Note:[/b] If you want to import custom 3d files have a look at [method add_scene_import_plugin] instead. + See [method add_inspector_plugin] for an example of how to register a plugin. @@ -108,6 +112,20 @@ + Registers a new inspector plugin. Inspector plugins are used to extend the default inspector. See [EditorInspectorPlugin] for more information. + [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the [code]EditorInspectorPlugin[/code] if the [code]EditorPlugin[/code] is disabled. + [codeblocks] + [gdscript] + const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd") + var inspector_plugin = MyInspectorPlugin.new() + + func _enter_tree(): + add_inspector_plugin(inspector_plugin) + + func _exit_tree(): + remove_inspector_plugin(inspector_plugin) + [/gdscript] + [/codeblocks] @@ -116,6 +134,7 @@ + Registers a new scene importer. Scene importers can import custom 3d formats as scenes. See [EditorImportPlugin] for more information. @@ -124,6 +143,8 @@ + Registers a new gizmo plugin. Gizmo plugins are used to add custom gizmos to a [Node3D]. See [EditorNode3DGizmoPlugin] for more information. + See [method add_inspector_plugin] for an example of how to register a plugin. @@ -580,6 +601,7 @@ + Removes an export plugin registered by [method add_export_plugin]. @@ -588,6 +610,7 @@ + Removes an import plugin registered by [method add_import_plugin]. @@ -596,6 +619,7 @@ + Removes an inspector plugin registered by [method add_import_plugin] @@ -604,6 +628,7 @@ + Removes a scene importer registered by [method add_scene_import_plugin]. @@ -612,6 +637,7 @@ + Removes a gizmo plugin registered by [method add_spatial_gizmo_plugin]. @@ -629,7 +655,7 @@ - Removes a registered custom translation parser plugin. + Removes a custom translation parser plugin registered by [method add_translation_parser_plugin].