mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
1816 lines
113 KiB
ReStructuredText
1816 lines
113 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_EditorPlugin:
|
||
|
||
EditorPlugin
|
||
============
|
||
|
||
**Eredita:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
**Ereditato da:** :ref:`GridMapEditorPlugin<class_GridMapEditorPlugin>`
|
||
|
||
Utilizzato dall'editor per estendere le sue funzionalità.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Descrizione
|
||
----------------------
|
||
|
||
Le estensioni sono usate dall'editor per estendere le funzionalità. I tipi più comuni di estensioni sono quelle che modificano un determinato nodo o tipo di risorsa, quelle di importazione ed esportazione. Vedi anche :ref:`EditorScript<class_EditorScript>` per aggiungere funzioni all'editor.
|
||
|
||
\ **Nota:** Alcuni nomi in questa classe contengono "left" o "right" (ad esempio :ref:`DOCK_SLOT_LEFT_UL<class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL>`). Queste API presuppongono un layout da sinistra a destra e sarebbero inverse se si usasse un layout da destra a sinistra. Questi nomi rimangono per motivi di compatibilità.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Tutorial
|
||
----------------
|
||
|
||
- :doc:`Indice della documentazione delle estensioni dell'editor <../tutorials/plugins/editor/index>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Metodi
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_apply_changes<class_EditorPlugin_private_method__apply_changes>`\ (\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_build<class_EditorPlugin_private_method__build>`\ (\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_clear<class_EditorPlugin_private_method__clear>`\ (\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_disable_plugin<class_EditorPlugin_private_method__disable_plugin>`\ (\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_edit<class_EditorPlugin_private_method__edit>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_enable_plugin<class_EditorPlugin_private_method__enable_plugin>`\ (\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`_forward_3d_gui_input<class_EditorPlugin_private_method__forward_3d_gui_input>`\ (\ viewport_camera\: :ref:`Camera3D<class_Camera3D>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_forward_canvas_gui_input<class_EditorPlugin_private_method__forward_canvas_gui_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_breakpoints<class_EditorPlugin_private_method__get_breakpoints>`\ (\ ) |virtual| |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Texture2D<class_Texture2D>` | :ref:`_get_plugin_icon<class_EditorPlugin_private_method__get_plugin_icon>`\ (\ ) |virtual| |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`_get_plugin_name<class_EditorPlugin_private_method__get_plugin_name>`\ (\ ) |virtual| |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_state<class_EditorPlugin_private_method__get_state>`\ (\ ) |virtual| |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`_get_unsaved_status<class_EditorPlugin_private_method__get_unsaved_status>`\ (\ for_scene\: :ref:`String<class_String>`\ ) |virtual| |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_get_window_layout<class_EditorPlugin_private_method__get_window_layout>`\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_handles<class_EditorPlugin_private_method__handles>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_has_main_screen<class_EditorPlugin_private_method__has_main_screen>`\ (\ ) |virtual| |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_make_visible<class_EditorPlugin_private_method__make_visible>`\ (\ visible\: :ref:`bool<class_bool>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_run_scene<class_EditorPlugin_private_method__run_scene>`\ (\ scene\: :ref:`String<class_String>`, args\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_save_external_data<class_EditorPlugin_private_method__save_external_data>`\ (\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_set_state<class_EditorPlugin_private_method__set_state>`\ (\ state\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_set_window_layout<class_EditorPlugin_private_method__set_window_layout>`\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_autoload_singleton<class_EditorPlugin_method_add_autoload_singleton>`\ (\ name\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_context_menu_plugin<class_EditorPlugin_method_add_context_menu_plugin>`\ (\ slot\: :ref:`ContextMenuSlot<enum_EditorContextMenuPlugin_ContextMenuSlot>`, plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Button<class_Button>` | :ref:`add_control_to_bottom_panel<class_EditorPlugin_method_add_control_to_bottom_panel>`\ (\ control\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_control_to_container<class_EditorPlugin_method_add_control_to_container>`\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_control_to_dock<class_EditorPlugin_method_add_control_to_dock>`\ (\ slot\: :ref:`DockSlot<enum_EditorPlugin_DockSlot>`, control\: :ref:`Control<class_Control>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_custom_type<class_EditorPlugin_method_add_custom_type>`\ (\ type\: :ref:`String<class_String>`, base\: :ref:`String<class_String>`, script\: :ref:`Script<class_Script>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_debugger_plugin<class_EditorPlugin_method_add_debugger_plugin>`\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_dock<class_EditorPlugin_method_add_dock>`\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_export_platform<class_EditorPlugin_method_add_export_platform>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_export_plugin<class_EditorPlugin_method_add_export_plugin>`\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>`\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>`\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_node_3d_gizmo_plugin<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_resource_conversion_plugin<class_EditorPlugin_method_add_resource_conversion_plugin>`\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_scene_format_importer_plugin<class_EditorPlugin_method_add_scene_format_importer_plugin>`\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`, first_priority\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_scene_post_import_plugin<class_EditorPlugin_method_add_scene_post_import_plugin>`\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_tool_menu_item<class_EditorPlugin_method_add_tool_menu_item>`\ (\ name\: :ref:`String<class_String>`, callable\: :ref:`Callable<class_Callable>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_tool_submenu_item<class_EditorPlugin_method_add_tool_submenu_item>`\ (\ name\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_translation_parser_plugin<class_EditorPlugin_method_add_translation_parser_plugin>`\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_undo_redo_inspector_hook_callback<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorPlugin_method_get_editor_interface>`\ (\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_export_as_menu<class_EditorPlugin_method_get_export_as_menu>`\ (\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_plugin_version<class_EditorPlugin_method_get_plugin_version>`\ (\ ) |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` | :ref:`get_script_create_dialog<class_EditorPlugin_method_get_script_create_dialog>`\ (\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` | :ref:`get_undo_redo<class_EditorPlugin_method_get_undo_redo>`\ (\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`hide_bottom_panel<class_EditorPlugin_method_hide_bottom_panel>`\ (\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`make_bottom_panel_item_visible<class_EditorPlugin_method_make_bottom_panel_item_visible>`\ (\ item\: :ref:`Control<class_Control>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`queue_save_layout<class_EditorPlugin_method_queue_save_layout>`\ (\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_autoload_singleton<class_EditorPlugin_method_remove_autoload_singleton>`\ (\ name\: :ref:`String<class_String>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_context_menu_plugin<class_EditorPlugin_method_remove_context_menu_plugin>`\ (\ plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>`\ (\ control\: :ref:`Control<class_Control>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_control_from_container<class_EditorPlugin_method_remove_control_from_container>`\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>`\ (\ control\: :ref:`Control<class_Control>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_custom_type<class_EditorPlugin_method_remove_custom_type>`\ (\ type\: :ref:`String<class_String>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_debugger_plugin<class_EditorPlugin_method_remove_debugger_plugin>`\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_dock<class_EditorPlugin_method_remove_dock>`\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_export_platform<class_EditorPlugin_method_remove_export_platform>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_export_plugin<class_EditorPlugin_method_remove_export_plugin>`\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_import_plugin<class_EditorPlugin_method_remove_import_plugin>`\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_inspector_plugin<class_EditorPlugin_method_remove_inspector_plugin>`\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_node_3d_gizmo_plugin<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>`\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_resource_conversion_plugin<class_EditorPlugin_method_remove_resource_conversion_plugin>`\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_scene_format_importer_plugin<class_EditorPlugin_method_remove_scene_format_importer_plugin>`\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_scene_post_import_plugin<class_EditorPlugin_method_remove_scene_post_import_plugin>`\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_tool_menu_item<class_EditorPlugin_method_remove_tool_menu_item>`\ (\ name\: :ref:`String<class_String>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_translation_parser_plugin<class_EditorPlugin_method_remove_translation_parser_plugin>`\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_undo_redo_inspector_hook_callback<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_dock_tab_icon<class_EditorPlugin_method_set_dock_tab_icon>`\ (\ control\: :ref:`Control<class_Control>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`\ (\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_input_event_forwarding_always_enabled<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>`\ (\ ) |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`update_overlays<class_EditorPlugin_method_update_overlays>`\ (\ ) |const| |
|
||
+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Segnali
|
||
--------------
|
||
|
||
.. _class_EditorPlugin_signal_main_screen_changed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**main_screen_changed**\ (\ screen_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_main_screen_changed>`
|
||
|
||
Emesso quando l'utente cambia lo spazio di lavoro (**2D**, **3D**, **Script**, **Gioco**, **AssetLib**). Funziona anche con schermate personalizzate definite dalle estensioni.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_signal_project_settings_changed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**project_settings_changed**\ (\ ) :ref:`🔗<class_EditorPlugin_signal_project_settings_changed>`
|
||
|
||
**Deprecato:** Use :ref:`ProjectSettings.settings_changed<class_ProjectSettings_signal_settings_changed>` instead.
|
||
|
||
Emesso quando qualunque impostazione del progetto viene modificata.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_signal_resource_saved:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**resource_saved**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_EditorPlugin_signal_resource_saved>`
|
||
|
||
Emesso quando la risorsa ``resource`` è stata salvata su disco. Vedi anche :ref:`scene_saved<class_EditorPlugin_signal_scene_saved>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_signal_scene_changed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**scene_changed**\ (\ scene_root\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_changed>`
|
||
|
||
Emesso quando la scena viene modificata nell'editor. L'argomento restituirà il nodo radice della scena che è appena diventata attiva. Se questa scena è nuova e vuota, l'argomento sarà ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_signal_scene_closed:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**scene_closed**\ (\ filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_closed>`
|
||
|
||
Emesso quando l'utente chiude una scena. L'argomento è un percorso file alla scena chiusa.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_signal_scene_saved:
|
||
|
||
.. rst-class:: classref-signal
|
||
|
||
**scene_saved**\ (\ filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_saved>`
|
||
|
||
Emesso quando una scena è stata salvata su disco. L'argomento è un percorso file alla scena salvata. Vedi anche :ref:`resource_saved<class_EditorPlugin_signal_resource_saved>`.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Enumerazioni
|
||
------------------------
|
||
|
||
.. _enum_EditorPlugin_CustomControlContainer:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **CustomControlContainer**: :ref:`🔗<enum_EditorPlugin_CustomControlContainer>`
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_TOOLBAR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_TOOLBAR** = ``0``
|
||
|
||
Barra degli strumenti dell'editor principale, accanto ai pulsanti di riproduzione.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_MENU:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_MENU** = ``1``
|
||
|
||
Barra degli strumenti visualizzata quando l'editor 3D è attivo.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_LEFT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_SIDE_LEFT** = ``2``
|
||
|
||
Barra laterale sinistra dell'editor 3D.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT** = ``3``
|
||
|
||
Barra laterale destra dell'editor 3D.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_BOTTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_BOTTOM** = ``4``
|
||
|
||
Pannello inferiore dell'editor 3D.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_MENU:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_MENU** = ``5``
|
||
|
||
Barra degli strumenti visualizzata quando l'editor 2D è attivo.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_LEFT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_SIDE_LEFT** = ``6``
|
||
|
||
Barra laterale sinistra dell'editor 2D.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_RIGHT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_SIDE_RIGHT** = ``7``
|
||
|
||
Barra laterale destra dell'editor 2D.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_BOTTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_BOTTOM** = ``8``
|
||
|
||
Pannello inferiore dell'editor 2D.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_INSPECTOR_BOTTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_INSPECTOR_BOTTOM** = ``9``
|
||
|
||
Sezione inferiore dell'Ispettore.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_LEFT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_PROJECT_SETTING_TAB_LEFT** = ``10``
|
||
|
||
Scheda della finestra di dialogo delle Impostazioni del progetto, a sinistra delle altre schede.
|
||
|
||
.. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_RIGHT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_PROJECT_SETTING_TAB_RIGHT** = ``11``
|
||
|
||
Scheda della finestra di dialogo delle Impostazioni del progetto, a destra delle altre schede.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_EditorPlugin_DockSlot:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **DockSlot**: :ref:`🔗<enum_EditorPlugin_DockSlot>`
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_NONE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_NONE** = ``-1``
|
||
|
||
The dock is closed.
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_UL** = ``0``
|
||
|
||
Slot di pannelli, lato sinistro, in alto a sinistra (vuoto nel layout predefinito).
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_BL** = ``1``
|
||
|
||
Slot di pannelli, lato sinistro, in basso a sinistra (vuoto nel layout predefinito).
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_UR** = ``2``
|
||
|
||
Slot di pannelli, lato sinistro, in alto a destra (nel layout predefinito include i pannelli Scena e Importazione).
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_BR** = ``3``
|
||
|
||
Slot di pannelli, lato sinistro, in basso a destra (nel layout predefinito include il pannello del FileSystem).
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_UL** = ``4``
|
||
|
||
Slot di pannelli, lato destro, in alto a sinistra (nel layout predefinito include i pannelli dell'Ispettore, di Nodo e della Cronologia).
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_BL** = ``5``
|
||
|
||
Slot di pannelli, lato destro, in basso a sinistra (vuoto nel layout predefinito).
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_UR** = ``6``
|
||
|
||
Slot di pannelli, lato destro, in alto a destra (vuoto nel layout predefinito).
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_BR** = ``7``
|
||
|
||
Slot di pannelli, lato destro, in basso a destra (vuoto nel layout predefinito).
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_BOTTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_BOTTOM** = ``8``
|
||
|
||
Bottom panel.
|
||
|
||
.. _class_EditorPlugin_constant_DOCK_SLOT_MAX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_MAX** = ``9``
|
||
|
||
Rappresenta la dimensione dell'enumerazione :ref:`DockSlot<enum_EditorPlugin_DockSlot>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_EditorPlugin_AfterGUIInput:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **AfterGUIInput**: :ref:`🔗<enum_EditorPlugin_AfterGUIInput>`
|
||
|
||
.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_PASS** = ``0``
|
||
|
||
Inoltra l':ref:`InputEvent<class_InputEvent>` ad altri EditorPlugin.
|
||
|
||
.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_STOP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_STOP** = ``1``
|
||
|
||
Impedisce all':ref:`InputEvent<class_InputEvent>` di raggiungere altre classi dell'Editor.
|
||
|
||
.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_CUSTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_CUSTOM** = ``2``
|
||
|
||
Passa l':ref:`InputEvent<class_InputEvent>` ad altre estensioni dell'editor, eccetto quella principale di :ref:`Node3D<class_Node3D>`. Questo può essere usato per impedire modifiche alla selezione del nodo e lavorare invece con i sotto-gizmo.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Descrizioni dei metodi
|
||
--------------------------------------------
|
||
|
||
.. _class_EditorPlugin_private_method__apply_changes:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_apply_changes**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__apply_changes>`
|
||
|
||
Questo metodo viene chiamato quando l'editor sta per salvare il progetto, passare a un'altra scheda, ecc. Chiede all'estensione di applicare eventuali modifiche di stato in sospeso per garantire una certa coerenza.
|
||
|
||
È utilizzato, ad esempio, negli editor di shader per far sapere all'estensione che deve applicare il codice shader scritto dall'utente all'oggetto.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__build:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_build**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__build>`
|
||
|
||
Questo metodo viene chiamato quando l'editor sta per avviare il progetto. L'estensione può quindi eseguire le operazioni richieste prima che il progetto sia avviato.
|
||
|
||
Questo metodo deve restituire un valore booleano. Se questo metodo restituisce ``false``, il progetto non sarà avviato. L'avvio è interrotto immediatamente, quindi ciò impedisce anche l'esecuzione di tutti i metodi :ref:`_build()<class_EditorPlugin_private_method__build>` delle altre estensioni.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__clear:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_clear**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__clear>`
|
||
|
||
Cancella tutti gli stati e reimposta a zero l'oggetto modificato. Ciò assicura che l'estensione non continui a modificare un nodo esistente o un nodo dalla scena sbagliata.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__disable_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_disable_plugin**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__disable_plugin>`
|
||
|
||
Chiamato dal motore quando l'utente disabilita l'**EditorPlugin** nella scheda delle Estensioni nella finestra delle impostazioni del progetto.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__edit:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_edit**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__edit>`
|
||
|
||
Questa funzione è usata per le estensioni che modificano tipi di oggetti specifici (nodi o risorse). Richiede all'editor di modificare l'oggetto specificato.
|
||
|
||
\ ``object`` può essere ``null`` se l'estensione stava modificando un oggetto, ma non c'è più alcun oggetto selezionato gestito da questa estensione. Ciò può essere usato per ripulire lo stato di modifica.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__enable_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_enable_plugin**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__enable_plugin>`
|
||
|
||
Chiamato dal motore quando l'utente abilita l'**EditorPlugin** nella scheda Estensioni della finestra delle Impostazioni del progetto.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__forward_3d_draw_over_viewport:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_forward_3d_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>`
|
||
|
||
Chiamato dal motore quando la viewport dell'editor 3D viene aggiornata. ``viewport_control`` è un overlay sopra la viewport è si può utilizzare per disegnare. È possibile aggiornare manualmente la viewport chiamando :ref:`update_overlays()<class_EditorPlugin_method_update_overlays>`.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
func _forward_3d_draw_over_viewport(overlay):
|
||
# Disegna un cerchio nella posizione del cursore.
|
||
overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
|
||
|
||
func _forward_3d_gui_input(camera, event):
|
||
if event is InputEventMouseMotion:
|
||
# Ridisegna la viewport quando il cursore viene spostato.
|
||
update_overlays()
|
||
return EditorPlugin.AFTER_GUI_INPUT_STOP
|
||
return EditorPlugin.AFTER_GUI_INPUT_PASS
|
||
|
||
.. code-tab:: csharp
|
||
|
||
public override void _Forward3DDrawOverViewport(Control viewportControl)
|
||
{
|
||
// Disegna un cerchio nella posizione del cursore.
|
||
viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
|
||
}
|
||
|
||
public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D viewportCamera, InputEvent @event)
|
||
{
|
||
if (@event is InputEventMouseMotion)
|
||
{
|
||
// Ridisegna la viewport quando il cursore viene spostato.
|
||
UpdateOverlays();
|
||
return EditorPlugin.AfterGuiInput.Stop;
|
||
}
|
||
return EditorPlugin.AfterGuiInput.Pass;
|
||
}
|
||
|
||
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_forward_3d_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>`
|
||
|
||
Questo metodo è identico a :ref:`_forward_3d_draw_over_viewport()<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>`, eccetto che disegna sopra tutto. Utile quando si desidera di un livello aggiuntivo che si mostra sopra qualsiasi altra cosa.
|
||
|
||
È necessario abilitare la chiamata di questo metodo tramite :ref:`set_force_draw_over_forwarding_enabled()<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__forward_3d_gui_input:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **_forward_3d_gui_input**\ (\ viewport_camera\: :ref:`Camera3D<class_Camera3D>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_gui_input>`
|
||
|
||
Chiamato quando c'è un nodo radice nella scena attualmente modificata, :ref:`_handles()<class_EditorPlugin_private_method__handles>` è implementato e si verifica un :ref:`InputEvent<class_InputEvent>` nella viewport 3D. Il valore restituito decide se :ref:`InputEvent<class_InputEvent>` viene consumato o inoltrato ad altri **EditorPlugin**. Vedi :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` per le opzioni.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
# Impedisce all'InputEvent di raggiungere altre classi dell'Editor.
|
||
func _forward_3d_gui_input(camera, event):
|
||
return EditorPlugin.AFTER_GUI_INPUT_STOP
|
||
|
||
.. code-tab:: csharp
|
||
|
||
// Impedisce all'InputEvent di raggiungere altre classi dell'Editor.
|
||
public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event)
|
||
{
|
||
return EditorPlugin.AfterGuiInput.Stop;
|
||
}
|
||
|
||
|
||
|
||
Questo metodo deve restituire :ref:`AFTER_GUI_INPUT_PASS<class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS>` per inoltrare l':ref:`InputEvent<class_InputEvent>` ad altre classi dell'Editor.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
# Consuma gli InputEventMouseMotion e inoltra gli altri tipi di InputEvent.
|
||
func _forward_3d_gui_input(camera, event):
|
||
return EditorPlugin.AFTER_GUI_INPUT_STOP if event is InputEventMouseMotion else EditorPlugin.AFTER_GUI_INPUT_PASS
|
||
|
||
.. code-tab:: csharp
|
||
|
||
// Consuma gli InputEventMouseMotion e inoltra gli altri tipi di InputEvent.
|
||
public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event)
|
||
{
|
||
return @event is InputEventMouseMotion ? EditorPlugin.AfterGuiInput.Stop : EditorPlugin.AfterGuiInput.Pass;
|
||
}
|
||
|
||
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__forward_canvas_draw_over_viewport:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_forward_canvas_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`
|
||
|
||
Chiamato dal motore quando viene aggiornata la viewport dell'editor 2D. ``viewport_control`` è un overlay sopra la viewport è si può utilizzare per disegnare. È possibile aggiornare manualmente la viewport chiamando :ref:`update_overlays()<class_EditorPlugin_method_update_overlays>`.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
func _forward_canvas_draw_over_viewport(overlay):
|
||
# Disegna un cerchio nella posizione del cursore.
|
||
overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
|
||
|
||
func _forward_canvas_gui_input(event):
|
||
if event is InputEventMouseMotion:
|
||
# Ridisegna la viewport quando il cursore viene spostato.
|
||
update_overlays()
|
||
return true
|
||
return false
|
||
|
||
.. code-tab:: csharp
|
||
|
||
public override void _ForwardCanvasDrawOverViewport(Control viewportControl)
|
||
{
|
||
// Disegna un cerchio nella posizione del cursore.
|
||
viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
|
||
}
|
||
|
||
public override bool _ForwardCanvasGuiInput(InputEvent @event)
|
||
{
|
||
if (@event is InputEventMouseMotion)
|
||
{
|
||
// Ridisegna la viewport quando il cursore viene spostato.
|
||
UpdateOverlays();
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_forward_canvas_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>`
|
||
|
||
Questo metodo è identico a :ref:`_forward_canvas_draw_over_viewport()<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`, eccetto che disegna sopra tutto. Utile quando si desidera di un livello aggiuntivo che si mostra sopra qualsiasi altra cosa.
|
||
|
||
È necessario abilitare la chiamata di questo metodo tramite :ref:`set_force_draw_over_forwarding_enabled()<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__forward_canvas_gui_input:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_forward_canvas_gui_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_gui_input>`
|
||
|
||
Chiamato quando c'è un nodo radice nella scena attualmente modificata, :ref:`_handles()<class_EditorPlugin_private_method__handles>` è implementato e si verifica un :ref:`InputEvent<class_InputEvent>` nella viewport 2D. Se questo metodo restituisce ``true``, ``event`` viene intercettato da questo **EditorPlugin**, altrimenti ``event`` viene inoltrato ad altre classi dell'Editor.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
# Impedisce all'InputEvent di raggiungere altre classi dell'Editor.
|
||
func _forward_canvas_gui_input(event):
|
||
return true
|
||
|
||
.. code-tab:: csharp
|
||
|
||
// Impedisce all'InputEvent di raggiungere altre classi dell'Editor.
|
||
public override bool ForwardCanvasGuiInput(InputEvent @event)
|
||
{
|
||
return true;
|
||
}
|
||
|
||
|
||
|
||
Questo metodo deve restituire ``false`` per inoltrare l':ref:`InputEvent<class_InputEvent>` ad altre classi dell'Editor.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
# Consuma gli InputEventMouseMotion e inoltra gli altri tipi di InputEvent.
|
||
func _forward_canvas_gui_input(event):
|
||
if (event is InputEventMouseMotion):
|
||
return true
|
||
return false
|
||
|
||
.. code-tab:: csharp
|
||
|
||
// Consuma gli InputEventMouseMotion e inoltra gli altri tipi di InputEvent.
|
||
public override bool _ForwardCanvasGuiInput(InputEvent @event)
|
||
{
|
||
if (@event is InputEventMouseMotion)
|
||
{
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__get_breakpoints:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **_get_breakpoints**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_breakpoints>`
|
||
|
||
Questo è per gli editor che modificano oggetti basati su script. È possibile restituire un elenco di punti di interruzione nel formato (``script:riga``), ad esempio: ``res://percorso_dello_script.gd:25``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__get_plugin_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Texture2D<class_Texture2D>` **_get_plugin_icon**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_plugin_icon>`
|
||
|
||
Sovrascrivi questo metodo nella tua estensione per restituire una :ref:`Texture2D<class_Texture2D>` per fornirgli un'icona.
|
||
|
||
Per le estensioni della schermata principale, l'icona appare nella parte superiore dello schermo, a destra dei pulsanti "2D", "3D", "Script", "Gioco" e "AssetLib".
|
||
|
||
Idealmente, l'icona dell'estensione dovrebbe essere bianca con uno sfondo trasparente e una dimensione di 16×16 pixel.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
func _get_plugin_icon():
|
||
# È possibile usare un'icona personalizzata:
|
||
return preload("res://addons/my_plugin/my_plugin_icon.svg")
|
||
# Oppure usare un'icona integrata:
|
||
return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")
|
||
|
||
.. code-tab:: csharp
|
||
|
||
public override Texture2D _GetPluginIcon()
|
||
{
|
||
// È possibile usare un'icona personalizzata:
|
||
return ResourceLoader.Load<Texture2D>("res://addons/my_plugin/my_plugin_icon.svg");
|
||
// Oppure usare un'icona integrata:
|
||
return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons");
|
||
}
|
||
|
||
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__get_plugin_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **_get_plugin_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_plugin_name>`
|
||
|
||
Sovrascrivi questo metodo nella tua estensione per fornire il nome dell'estensione quando viene visualizzato nell'editor Godot.
|
||
|
||
Per le estensioni della schermata principale, il nome appare nella parte superiore dello schermo, a destra dei pulsanti "2D", "3D", "Script", "Gioco" e "AssetLib".
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__get_state:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **_get_state**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_state>`
|
||
|
||
Sovrascrivi questo metodo per fornire i dati di stato che si desidera salvare, come posizione della vista, impostazioni della griglia, pannelli compressi, ecc. Questo è utilizzato quando si salva la scena (in modo che lo stato sia mantenuto quando la si riapre) e per cambiare scheda (in modo che lo stato possa essere ripristinato quando si passa alla scheda). Questi dati sono salvati automaticamente per ogni scena in un file ``editstate`` nella cartella dei metadati dell'editor. Se si desidera memorizzare i dati dell'editor globali (indipendenti dalla scena) per l'estensione, è possibile usare :ref:`_get_window_layout()<class_EditorPlugin_private_method__get_window_layout>`.
|
||
|
||
Usa :ref:`_set_state()<class_EditorPlugin_private_method__set_state>` per ripristinare lo stato salvato.
|
||
|
||
\ **Nota:** Questo metodo non dovrebbe essere utilizzato per salvare impostazioni importanti che dovrebbero persistere con il progetto.
|
||
|
||
\ **Nota:** È necessario implementare :ref:`_get_plugin_name()<class_EditorPlugin_private_method__get_plugin_name>` affinché lo stato sia memorizzato e ripristinato correttamente.
|
||
|
||
::
|
||
|
||
func _get_state():
|
||
var state = { "zoom": zoom, "preferred_color": my_color }
|
||
return state
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__get_unsaved_status:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **_get_unsaved_status**\ (\ for_scene\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_unsaved_status>`
|
||
|
||
Sovrascrivi questo metodo per fornire un messaggio personalizzato che elenca le modifiche non salvate. L'editor chiamerà questo metodo quando esce o chiude una scena e visualizzerà la stringa restituita in una finestra di dialogo di conferma. Restituisce una stringa vuota se l'estensione non ha modifiche non salvate.
|
||
|
||
Quando si chiude una scena, ``for_scene`` è il percorso per la scena che si sta chiudendo. Si può usare per gestire le risorse integrate in quella scena.
|
||
|
||
Se l'utente conferma il salvataggio, sarà chiamato :ref:`_save_external_data()<class_EditorPlugin_private_method__save_external_data>`, prima di chiudere l'editor.
|
||
|
||
::
|
||
|
||
func _get_unsaved_status(for_scene):
|
||
if not unsaved:
|
||
return ""
|
||
|
||
if for_scene.is_empty():
|
||
return "Salvare le modifiche in MyCustomPlugin prima di chiudere?"
|
||
else:
|
||
return "La scena %s ha modifiche da MyCustomPlugin. Salvare prima di chiudere?" % for_scene.get_file()
|
||
|
||
func _save_external_data():
|
||
unsaved = false
|
||
|
||
Se l'estensione non ha modifiche specifiche per la scena, è possibile ignorare le chiamate quando si chiudono le scene:
|
||
|
||
::
|
||
|
||
func _get_unsaved_status(for_scene):
|
||
if not for_scene.is_empty():
|
||
return ""
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__get_window_layout:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_get_window_layout**\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__get_window_layout>`
|
||
|
||
Sovrascrivi questo metodo per fornire il layout nell'interfaccia utente dell'estensione o qualsiasi altro dato che si desidera memorizzare. Questo è utilizzato per salvare il layout dell'editor del progetto quando viene chiamato :ref:`queue_save_layout()<class_EditorPlugin_method_queue_save_layout>` o il layout dell'editor è stato modificato (ad esempio cambiando la posizione di un pannello). I dati sono memorizzati nel file ``editor_layout.cfg`` nella cartella dei metadati dell'editor.
|
||
|
||
Utilizza :ref:`_set_window_layout()<class_EditorPlugin_private_method__set_window_layout>` per ripristinare il layout salvato.
|
||
|
||
::
|
||
|
||
func _get_window_layout(configuration):
|
||
configuration.set_value("MyPlugin", "window_position", $Window.position)
|
||
configuration.set_value("MyPlugin", "icon_color", $Icon.modulate)
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__handles:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_handles**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__handles>`
|
||
|
||
Implementa questa funzione se la tua estensione modifica un tipo specifico di oggetto (risorsa o nodo). Se restituisci ``true``, le funzioni :ref:`_edit()<class_EditorPlugin_private_method__edit>` e :ref:`_make_visible()<class_EditorPlugin_private_method__make_visible>` saranno chiamate quando l'editor le richiede. Se i metodi :ref:`_forward_canvas_gui_input()<class_EditorPlugin_private_method__forward_canvas_gui_input>` e :ref:`_forward_3d_gui_input()<class_EditorPlugin_private_method__forward_3d_gui_input>` sono stati implementati, anche questi saranno chiamati.
|
||
|
||
\ **Nota:** Ogni estensione dovrebbe gestire solo un tipo di oggetto alla volta. Se un'estensione gestisce più tipi di oggetti e sono modificati allo stesso tempo, si verificheranno errori.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__has_main_screen:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_has_main_screen**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__has_main_screen>`
|
||
|
||
Restituisce ``true`` se questo è un'estensione dell'editor per la schermata principale (va nel selettore dell'area di lavoro insieme a **2D**, **3D**, **Script**, **Gioco** e **AssetLib**).
|
||
|
||
Quando l'area di lavoro dell'estensione è selezionata, le altre estensioni nella schermata principale saranno nascosti, ma l'estensione non apparirà automaticamente. Deve essere aggiunta come figlio di :ref:`EditorInterface.get_editor_main_screen()<class_EditorInterface_method_get_editor_main_screen>` e resa visibile all'interno di :ref:`_make_visible()<class_EditorPlugin_private_method__make_visible>`.
|
||
|
||
Usa :ref:`_get_plugin_name()<class_EditorPlugin_private_method__get_plugin_name>` e :ref:`_get_plugin_icon()<class_EditorPlugin_private_method__get_plugin_icon>` per personalizzare l'aspetto del pulsante dell'estensione.
|
||
|
||
::
|
||
|
||
var plugin_control
|
||
|
||
func _enter_tree():
|
||
plugin_control = preload("my_plugin_control.tscn").instantiate()
|
||
EditorInterface.get_editor_main_screen().add_child(plugin_control)
|
||
plugin_control.hide()
|
||
|
||
func _has_main_screen():
|
||
return true
|
||
|
||
func _make_visible(visible):
|
||
plugin_control.visible = visible
|
||
|
||
func _get_plugin_name():
|
||
return "My Super Cool Plugin 3000"
|
||
|
||
func _get_plugin_icon():
|
||
return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__make_visible:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_make_visible**\ (\ visible\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__make_visible>`
|
||
|
||
Questa funzione sarà chiamata quando si richiede all'editor di diventare visibile. È utilizzata per le estensioni che modificano un tipo di oggetto specifico.
|
||
|
||
Ricorda che è necessario gestire manualmente la visibilità di tutti i controlli dell'editor.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__run_scene:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **_run_scene**\ (\ scene\: :ref:`String<class_String>`, args\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__run_scene>`
|
||
|
||
This function is called when an individual scene is about to be played in the editor. ``args`` is a list of command line arguments that will be passed to the new Godot instance, which will be replaced by the list returned by this function.
|
||
|
||
::
|
||
|
||
func _run_scene(scene, args):
|
||
args.append("--an-extra-argument")
|
||
return args
|
||
|
||
\ **Note:** Text that is printed in this method will not be visible in the editor's Output panel unless :ref:`EditorSettings.run/output/always_clear_output_on_play<class_EditorSettings_property_run/output/always_clear_output_on_play>` is ``false``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__save_external_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_save_external_data**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__save_external_data>`
|
||
|
||
Questo metodo viene chiamato dopo che l'editor salva il progetto o quando viene chiuso. Chiede al plugin di salvare le scene/risorse esterne modificate.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__set_state:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_set_state**\ (\ state\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__set_state>`
|
||
|
||
Ripristina lo stato salvato da :ref:`_get_state()<class_EditorPlugin_private_method__get_state>`. Questo metodo è chiamato quando la scheda della scena attuale è modificata nell'editor.
|
||
|
||
\ **Nota:** La tua estensione deve implementare :ref:`_get_plugin_name()<class_EditorPlugin_private_method__get_plugin_name>`, altrimenti non sarà riconosciuta e questo metodo non sarà chiamato.
|
||
|
||
::
|
||
|
||
func _set_state(data):
|
||
zoom = data.get("zoom", 1.0)
|
||
preferred_color = data.get("my_color", Color.WHITE)
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_private_method__set_window_layout:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_set_window_layout**\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__set_window_layout>`
|
||
|
||
Ripristina il layout dell'interfaccia utente dell'estensione e i dati salvati da :ref:`_get_window_layout()<class_EditorPlugin_private_method__get_window_layout>`. Questo metodo è chiamato per ogni estensione all'avvio dell'editor. Utilizza il file ``configuration`` fornito per leggere i dati salvati.
|
||
|
||
::
|
||
|
||
func _set_window_layout(configuration):
|
||
$Window.position = configuration.get_value("MyPlugin", "window_position", Vector2())
|
||
$Icon.modulate = configuration.get_value("MyPlugin", "icon_color", Color.WHITE)
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_autoload_singleton:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_autoload_singleton**\ (\ name\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_add_autoload_singleton>`
|
||
|
||
Aggiunge uno script nel percorso ``path`` all'elenco degli Autoload, con il nome ``name``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_context_menu_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_context_menu_plugin**\ (\ slot\: :ref:`ContextMenuSlot<enum_EditorContextMenuPlugin_ContextMenuSlot>`, plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_context_menu_plugin>`
|
||
|
||
Aggiunge un'estensione al menu contestuale. ``slot`` è il menu contestuale in cui sarà aggiunta l'estensione.
|
||
|
||
\ **Nota:** Un'istanza d'estensione può appartenere solo a un singolo slot del menu contestuale.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_control_to_bottom_panel:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Button<class_Button>` **add_control_to_bottom_panel**\ (\ control\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_bottom_panel>`
|
||
|
||
**Deprecato:** Use :ref:`add_dock()<class_EditorPlugin_method_add_dock>` instead, with :ref:`EditorDock.default_slot<class_EditorDock_property_default_slot>` set to :ref:`DOCK_SLOT_BOTTOM<class_EditorPlugin_constant_DOCK_SLOT_BOTTOM>`.
|
||
|
||
Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to a button that is outside the scene tree. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel()<class_EditorPlugin_method_remove_control_from_bottom_panel>` and free it with :ref:`Node.queue_free()<class_Node_method_queue_free>`.
|
||
|
||
\ ``shortcut`` is a shortcut that, when activated, will toggle the bottom panel's visibility. The shortcut object is only set when this control is added to the bottom panel.
|
||
|
||
\ **Note** See the default editor bottom panel shortcuts in the Editor Settings for inspiration. By convention, they all use :kbd:`Alt` modifier.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_control_to_container:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_control_to_container**\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_container>`
|
||
|
||
Aggiunge un controllo personalizzato a un contenitore nell'interfaccia utente dell'editor.
|
||
|
||
Ricorda che è necessario gestire manualmente la visibilità dei propri controlli personalizzati (e probabilmente nasconderli dopo averli aggiunti).
|
||
|
||
Quando l'estensione viene disattivata, assicurarsi di rimuovere il controllo personalizzato con :ref:`remove_control_from_container()<class_EditorPlugin_method_remove_control_from_container>` e liberarlo con :ref:`Node.queue_free()<class_Node_method_queue_free>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_control_to_dock:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_control_to_dock**\ (\ slot\: :ref:`DockSlot<enum_EditorPlugin_DockSlot>`, control\: :ref:`Control<class_Control>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_dock>`
|
||
|
||
**Deprecato:** Use :ref:`add_dock()<class_EditorPlugin_method_add_dock>` instead.
|
||
|
||
Aggiunge il controllo a uno slot specifico di pannello.
|
||
|
||
Se il pannello viene riposizionato e finché l'estensione è attiva, l'editor salverà la posizione del pannello nelle sessioni successive.
|
||
|
||
Quando la propria estensione viene disattivata, assicurarsi di rimuovere il controllo personalizzato con :ref:`remove_control_from_docks()<class_EditorPlugin_method_remove_control_from_docks>` e liberarlo con :ref:`Node.queue_free()<class_Node_method_queue_free>`.
|
||
|
||
Facoltativamente, è possibile specificare un parametro di scelta rapida. Quando viene premuta, questa aprirà e focalizzerà il pannello.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_custom_type:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_custom_type**\ (\ type\: :ref:`String<class_String>`, base\: :ref:`String<class_String>`, script\: :ref:`Script<class_Script>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_EditorPlugin_method_add_custom_type>`
|
||
|
||
Aggiunge un tipo personalizzato, che apparirà nell'elenco di nodi o di risorse.
|
||
|
||
Quando viene selezionato un certo nodo o risorsa, verrà istanziato il tipo di base (ad esempio "Node3D", "Control", "Resource"), quindi lo script verrà caricato e impostato su questo oggetto.
|
||
|
||
\ **Nota:** Il tipo di base è la classe base del motore che eredita la gerarchia di classi di questo tipo, non alcuna classe padre di tipo personalizzato.
|
||
|
||
Puoi usare il metodo virtuale :ref:`_handles()<class_EditorPlugin_private_method__handles>` per verificare se il tuo oggetto personalizzato è in fase di modifica verificato lo script o tramite la parola chiave ``is``.
|
||
|
||
Durante l'esecuzione, questo sarà un semplice oggetto con uno script, quindi questa funzione non deve essere chiamata.
|
||
|
||
\ **Nota:** I tipi personalizzati aggiunti in questo modo non sono classi vere. Sono solo un aiuto per creare un nodo con uno script specifico.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_debugger_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_debugger_plugin**\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_debugger_plugin>`
|
||
|
||
Aggiunge uno :ref:`Script<class_Script>` come estensione di debugger al Debugger. Lo script deve estendere :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_dock:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_dock**\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) :ref:`🔗<class_EditorPlugin_method_add_dock>`
|
||
|
||
Adds a new dock.
|
||
|
||
When your plugin is deactivated, make sure to remove your custom dock with :ref:`remove_dock()<class_EditorPlugin_method_remove_dock>` and free it with :ref:`Node.queue_free()<class_Node_method_queue_free>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_export_platform:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_export_platform**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) :ref:`🔗<class_EditorPlugin_method_add_export_platform>`
|
||
|
||
Registra un nuovo :ref:`EditorExportPlatform<class_EditorExportPlatform>`. Le piattaforme di esportazione forniscono funzionalità di esportazione verso la piattaforma specifica.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_export_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_export_plugin**\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_export_plugin>`
|
||
|
||
Registra un nuovo :ref:`EditorExportPlugin<class_EditorExportPlugin>`. Le estensioni di esportazione servono per effettuare attività quando il progetto viene esportato.
|
||
|
||
Vedi :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` per un esempio di come registrare un'estensione.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_import_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_import_plugin**\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_import_plugin>`
|
||
|
||
Registra un nuovo :ref:`EditorImportPlugin<class_EditorImportPlugin>`. Le estensioni di importazione servono per importare contenuti personalizzati e non supportati come un tipo di :ref:`Resource<class_Resource>` personalizzato.
|
||
|
||
Se ``first_priority`` è ``true``, la nuovo estensione di importazione viene inserita per prima nell'elenco e ha la precedenza sulle estensioni preesistenti.
|
||
|
||
\ **Nota:** Se vuoi importare formati di contenuti 3D personalizzati usa invece :ref:`add_scene_format_importer_plugin()<class_EditorPlugin_method_add_scene_format_importer_plugin>`.
|
||
|
||
Vedi :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` per un esempio di come registrare un'estensione.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_inspector_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_inspector_plugin**\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_inspector_plugin>`
|
||
|
||
Registra un nuovo :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`. Le estensioni dell'Ispettore servono per estendere :ref:`EditorInspector<class_EditorInspector>` e fornire strumenti di configurazione personalizzati per le proprietà del tuo oggetto.
|
||
|
||
\ **Nota:** Usa sempre :ref:`remove_inspector_plugin()<class_EditorPlugin_method_remove_inspector_plugin>` per rimuovere l':ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` registrato quando il tuo **EditorPlugin** è disabilitato per evitare perdite di memoria e comportamenti imprevisti.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: 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)
|
||
|
||
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_node_3d_gizmo_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_node_3d_gizmo_plugin**\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`
|
||
|
||
Registra un nuovo :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`. Le estensioni dei gizmo servono per aggiungere gizmo personalizzati alla viewport di anteprima 3D per un :ref:`Node3D<class_Node3D>`.
|
||
|
||
Vedi :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` per un esempio di come registrare un'estensione.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_resource_conversion_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_resource_conversion_plugin**\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_resource_conversion_plugin>`
|
||
|
||
Registra un nuovo :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`. Le estensioni di conversione delle risorse servono per aggiungere convertitori di risorse personalizzati all'ispettore dell'editor.
|
||
|
||
Vedi :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` per un esempio di come creare un'estensione di conversione delle risorse.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_scene_format_importer_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_scene_format_importer_plugin>`
|
||
|
||
Registra un nuovo :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`. Gli importatori di scene servono per importare formati di contenuti 3D personalizzati come scene.
|
||
|
||
Se ``first_priority`` è ``true``, la nuovo estensione di importazione viene inserita per prima nell'elenco e ha la precedenza sulle estensioni preesistenti.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_scene_post_import_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_scene_post_import_plugin>`
|
||
|
||
Aggiungi un :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`. Queste estensioni consentono di personalizzare il processo di importazione delle risorse 3D, aggiungendo nuove opzioni alle finestre di dialogo di importazione.
|
||
|
||
Se ``first_priority`` è ``true``, la nuovo estensione di importazione viene inserita per prima nell'elenco e ha la precedenza sulle estensioni preesistenti.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_tool_menu_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_tool_menu_item**\ (\ name\: :ref:`String<class_String>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_add_tool_menu_item>`
|
||
|
||
Aggiunge una voce di menù personalizzata a **Progetto > Strumenti** denominata ``name``. Quando viene cliccata, verrà chiamato il ``callable`` fornito.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_tool_submenu_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_tool_submenu_item**\ (\ name\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) :ref:`🔗<class_EditorPlugin_method_add_tool_submenu_item>`
|
||
|
||
Aggiunge un sottomenu :ref:`PopupMenu<class_PopupMenu>` personalizzato in **Progetto > Strumenti >** denominato ``name``. Utilizza :ref:`remove_tool_menu_item()<class_EditorPlugin_method_remove_tool_menu_item>` durante la pulizia dell'estensione per rimuovere il menu.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_translation_parser_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_translation_parser_plugin>`
|
||
|
||
Registers a custom translation parser plugin for extracting translatable strings from custom files.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_add_undo_redo_inspector_hook_callback:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`
|
||
|
||
Aggancia un callback alla creazione dell'azione annulla/ripristina quando una proprietà viene modificata nell'ispettore. Ciò consente, ad esempio, di salvare altre proprietà che potrebbero essere perse quando una determinata proprietà viene modificata.
|
||
|
||
Il callback deve avere 4 argomenti: :ref:`Object<class_Object>` ``undo_redo``, :ref:`Object<class_Object>` ``modified_object``, :ref:`String<class_String>` ``property`` e :ref:`Variant<class_Variant>` ``new_value``. Sono, rispettivamente, l'oggetto :ref:`UndoRedo<class_UndoRedo>` utilizzato dall'ispettore, l'oggetto attualmente modificato, il nome della proprietà modificata e il nuovo valore che la proprietà sta per assumere.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_get_editor_interface:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`EditorInterface<class_EditorInterface>` **get_editor_interface**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_editor_interface>`
|
||
|
||
**Deprecato:** :ref:`EditorInterface<class_EditorInterface>` is a global singleton and can be accessed directly by its name.
|
||
|
||
Restituisce l'istanza del singleton :ref:`EditorInterface<class_EditorInterface>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_get_export_as_menu:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PopupMenu<class_PopupMenu>` **get_export_as_menu**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_export_as_menu>`
|
||
|
||
Restituisce il :ref:`PopupMenu<class_PopupMenu>` in **Scena > Esporta come...**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_get_plugin_version:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_plugin_version**\ (\ ) |const| :ref:`🔗<class_EditorPlugin_method_get_plugin_version>`
|
||
|
||
Fornisce la versione dell'estensione dichiarata nel file di configurazione ``plugin.cfg``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_get_script_create_dialog:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`ScriptCreateDialog<class_ScriptCreateDialog>` **get_script_create_dialog**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_script_create_dialog>`
|
||
|
||
Ottiene la finestra di dialogo dell'editor utilizzata per creare script.
|
||
|
||
\ **Nota:** Gli utenti possono configurarla prima dell'uso.
|
||
|
||
\ **Attenzione:** Rimuovere e liberare questo nodo renderà inutile una parte dell'editor e potrebbero causare un arresto anomalo.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_get_undo_redo:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` **get_undo_redo**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_undo_redo>`
|
||
|
||
Ottiene l'oggetto annulla/ripristina. La maggior parte delle azioni nell'editor possono essere annullate, quindi usa questo oggetto per assicurarti che ciò accada quando è necessario.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_hide_bottom_panel:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **hide_bottom_panel**\ (\ ) :ref:`🔗<class_EditorPlugin_method_hide_bottom_panel>`
|
||
|
||
Minimizza il pannello inferiore.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_make_bottom_panel_item_visible:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **make_bottom_panel_item_visible**\ (\ item\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_make_bottom_panel_item_visible>`
|
||
|
||
Rende visibile un elemento specifico nel pannello inferiore.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_queue_save_layout:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **queue_save_layout**\ (\ ) :ref:`🔗<class_EditorPlugin_method_queue_save_layout>`
|
||
|
||
Accoda il salvataggio della disposizione nell'editor del progetto.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_autoload_singleton:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_autoload_singleton**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_autoload_singleton>`
|
||
|
||
Rimuove l'Autoload denominato ``name`` dalla lista.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_context_menu_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_context_menu_plugin**\ (\ plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_context_menu_plugin>`
|
||
|
||
Rimuove l'estensione di menu contestuale specificata.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_control_from_bottom_panel:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_control_from_bottom_panel**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_bottom_panel>`
|
||
|
||
**Deprecato:** Use :ref:`remove_dock()<class_EditorPlugin_method_remove_dock>` instead.
|
||
|
||
Rimuove il controllo dal pannello inferiore. Bisogna chiamare manualmente :ref:`Node.queue_free()<class_Node_method_queue_free>` per liberare il controllo.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_control_from_container:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_control_from_container**\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_container>`
|
||
|
||
Rimuove il controllo dal contenitore specificato. Bisogna chiamare manualmente :ref:`Node.queue_free()<class_Node_method_queue_free>` per liberare il controllo.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_control_from_docks:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_control_from_docks**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_docks>`
|
||
|
||
**Deprecato:** Use :ref:`remove_dock()<class_EditorPlugin_method_remove_dock>` instead.
|
||
|
||
Rimuove il controllo dal pannello. Bisogna chiamare manualmente :ref:`Node.queue_free()<class_Node_method_queue_free>` per liberare il controllo.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_custom_type:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_custom_type**\ (\ type\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_custom_type>`
|
||
|
||
Rimuove un tipo personalizzato aggiunto da :ref:`add_custom_type()<class_EditorPlugin_method_add_custom_type>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_debugger_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_debugger_plugin**\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_debugger_plugin>`
|
||
|
||
Rimuove l'estensione del debugger con lo script specificato dal Debugger.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_dock:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_dock**\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_dock>`
|
||
|
||
Removes ``dock`` from the available docks. You should manually call :ref:`Node.queue_free()<class_Node_method_queue_free>` to free it.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_export_platform:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_export_platform**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_export_platform>`
|
||
|
||
Rimuove una piattaforma di esportazione registrata da :ref:`add_export_platform()<class_EditorPlugin_method_add_export_platform>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_export_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_export_plugin**\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_export_plugin>`
|
||
|
||
Rimuove un'estensione di esportazione registrata da :ref:`add_export_plugin()<class_EditorPlugin_method_add_export_plugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_import_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_import_plugin**\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_import_plugin>`
|
||
|
||
Rimuove un'estensione di importazione registrata da :ref:`add_import_plugin()<class_EditorPlugin_method_add_import_plugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_inspector_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_inspector_plugin**\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_inspector_plugin>`
|
||
|
||
Rimuove un'estensione dell'ispettore registrata da :ref:`add_import_plugin()<class_EditorPlugin_method_add_import_plugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_node_3d_gizmo_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_node_3d_gizmo_plugin**\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>`
|
||
|
||
Rimuove un'estensione gizmo registrata da :ref:`add_node_3d_gizmo_plugin()<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_resource_conversion_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_resource_conversion_plugin**\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_resource_conversion_plugin>`
|
||
|
||
Rimuove un'estensione di conversione delle risorse registrato da :ref:`add_resource_conversion_plugin()<class_EditorPlugin_method_add_resource_conversion_plugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_scene_format_importer_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_scene_format_importer_plugin>`
|
||
|
||
Rimuove un importatore di formati di scena registrato da :ref:`add_scene_format_importer_plugin()<class_EditorPlugin_method_add_scene_format_importer_plugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_scene_post_import_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_scene_post_import_plugin>`
|
||
|
||
Rimuovere l':ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, aggiunto con :ref:`add_scene_post_import_plugin()<class_EditorPlugin_method_add_scene_post_import_plugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_tool_menu_item:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_tool_menu_item**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_tool_menu_item>`
|
||
|
||
Rimuove l'opzione ``name`` dal menu **Progetto > Strumenti**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_translation_parser_plugin:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_translation_parser_plugin>`
|
||
|
||
Rimuove un'estensione di elaborazione personalizzata della traduzione registrata da :ref:`add_translation_parser_plugin()<class_EditorPlugin_method_add_translation_parser_plugin>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>`
|
||
|
||
Rimuove un callback aggiunto in precedenza da :ref:`add_undo_redo_inspector_hook_callback()<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_set_dock_tab_icon:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_dock_tab_icon**\ (\ control\: :ref:`Control<class_Control>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_EditorPlugin_method_set_dock_tab_icon>`
|
||
|
||
**Deprecato:** Use :ref:`EditorDock.dock_icon<class_EditorDock_property_dock_icon>` instead.
|
||
|
||
Imposta l'icona della scheda per il :ref:`Control<class_Control>` specificato in una casella di pannello. Impostare ``null`` rimuove l'icona.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_set_force_draw_over_forwarding_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_force_draw_over_forwarding_enabled**\ (\ ) :ref:`🔗<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`
|
||
|
||
Abilita la chiamata di :ref:`_forward_canvas_force_draw_over_viewport()<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>` per l'editor 2D e :ref:`_forward_3d_force_draw_over_viewport()<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>` per l'editor 3D quando le loro viewport vengono aggiornate. Bisogna chiamare questo metodo solo una volta e funzionerà in modo permanente per quest'estensione.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_set_input_event_forwarding_always_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_input_event_forwarding_always_enabled**\ (\ ) :ref:`🔗<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>`
|
||
|
||
Usa questo metodo se vuoi sempre ricevere input dalla schermata di visualizzazione 3D all'interno di :ref:`_forward_3d_gui_input()<class_EditorPlugin_private_method__forward_3d_gui_input>`. Potrebbe essere particolarmente utile se il tuo plugin desidera utilizzare i raycast nella scena.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_EditorPlugin_method_update_overlays:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **update_overlays**\ (\ ) |const| :ref:`🔗<class_EditorPlugin_method_update_overlays>`
|
||
|
||
Aggiorna le sovrapposizioni della viewport dell'editor 2D e 3D. Fa in modo che vengano chiamati i metodi :ref:`_forward_canvas_draw_over_viewport()<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`, :ref:`_forward_canvas_force_draw_over_viewport()<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>`, :ref:`_forward_3d_draw_over_viewport()<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>` e :ref:`_forward_3d_force_draw_over_viewport()<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>`.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)`
|
||
.. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)`
|
||
.. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)`
|
||
.. |void| replace:: :abbr:`void (Nessun valore restituito.)`
|