class_editorplugin.rst 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the EditorPlugin.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_EditorPlugin:
  5. EditorPlugin
  6. ============
  7. **Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Used by the editor to extend its functionality.
  12. Member Functions
  13. ----------------
  14. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`ToolButton<class_toolbutton>` | :ref:`add_control_to_bottom_panel<class_EditorPlugin_add_control_to_bottom_panel>` **(** :ref:`Control<class_control>` control, :ref:`String<class_string>` title **)** |
  16. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`add_control_to_container<class_EditorPlugin_add_control_to_container>` **(** :ref:`int<class_int>` container, :ref:`Control<class_control>` control **)** |
  18. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`add_control_to_dock<class_EditorPlugin_add_control_to_dock>` **(** :ref:`int<class_int>` slot, :ref:`Control<class_control>` control **)** |
  20. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`add_custom_type<class_EditorPlugin_add_custom_type>` **(** :ref:`String<class_string>` type, :ref:`String<class_string>` base, :ref:`Script<class_script>` script, :ref:`Texture<class_texture>` icon **)** |
  22. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`add_export_plugin<class_EditorPlugin_add_export_plugin>` **(** :ref:`EditorExportPlugin<class_editorexportplugin>` exporter **)** |
  24. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`add_import_plugin<class_EditorPlugin_add_import_plugin>` **(** :ref:`EditorImportPlugin<class_editorimportplugin>` importer **)** |
  26. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`add_tool_submenu_item<class_EditorPlugin_add_tool_submenu_item>` **(** :ref:`String<class_string>` name, :ref:`Object<class_object>` submenu **)** |
  28. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`apply_changes<class_EditorPlugin_apply_changes>` **(** **)** virtual |
  30. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`clear<class_EditorPlugin_clear>` **(** **)** virtual |
  32. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`EditorSpatialGizmo<class_editorspatialgizmo>` | :ref:`create_spatial_gizmo<class_EditorPlugin_create_spatial_gizmo>` **(** :ref:`Spatial<class_spatial>` for_spatial **)** virtual |
  34. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`edit<class_EditorPlugin_edit>` **(** :ref:`Object<class_object>` object **)** virtual |
  36. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`forward_canvas_gui_input<class_EditorPlugin_forward_canvas_gui_input>` **(** :ref:`Transform2D<class_transform2d>` canvas_xform, :ref:`InputEvent<class_inputevent>` event **)** virtual |
  38. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`forward_draw_over_canvas<class_EditorPlugin_forward_draw_over_canvas>` **(** :ref:`Transform2D<class_transform2d>` canvas_xform, :ref:`Control<class_control>` canvas **)** virtual |
  40. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`forward_spatial_gui_input<class_EditorPlugin_forward_spatial_gui_input>` **(** :ref:`Camera<class_camera>` camera, :ref:`InputEvent<class_inputevent>` event **)** virtual |
  42. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`PoolStringArray<class_poolstringarray>` | :ref:`get_breakpoints<class_EditorPlugin_get_breakpoints>` **(** **)** virtual |
  44. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`EditorInterface<class_editorinterface>` | :ref:`get_editor_interface<class_EditorPlugin_get_editor_interface>` **(** **)** |
  46. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`String<class_string>` | :ref:`get_plugin_name<class_EditorPlugin_get_plugin_name>` **(** **)** virtual |
  48. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`Dictionary<class_dictionary>` | :ref:`get_state<class_EditorPlugin_get_state>` **(** **)** virtual |
  50. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`UndoRedo<class_undoredo>` | :ref:`get_undo_redo<class_EditorPlugin_get_undo_redo>` **(** **)** |
  52. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`get_window_layout<class_EditorPlugin_get_window_layout>` **(** :ref:`ConfigFile<class_configfile>` layout **)** virtual |
  54. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`handles<class_EditorPlugin_handles>` **(** :ref:`Object<class_object>` object **)** virtual |
  56. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`has_main_screen<class_EditorPlugin_has_main_screen>` **(** **)** virtual |
  58. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | void | :ref:`hide_bottom_panel<class_EditorPlugin_hide_bottom_panel>` **(** **)** |
  60. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | void | :ref:`make_bottom_panel_item_visible<class_EditorPlugin_make_bottom_panel_item_visible>` **(** :ref:`Control<class_control>` item **)** |
  62. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`make_visible<class_EditorPlugin_make_visible>` **(** :ref:`bool<class_bool>` visible **)** virtual |
  64. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | void | :ref:`queue_save_layout<class_EditorPlugin_queue_save_layout>` **(** **)** const |
  66. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`remove_control_from_bottom_panel<class_EditorPlugin_remove_control_from_bottom_panel>` **(** :ref:`Control<class_control>` control **)** |
  68. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`remove_control_from_docks<class_EditorPlugin_remove_control_from_docks>` **(** :ref:`Control<class_control>` control **)** |
  70. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`remove_custom_type<class_EditorPlugin_remove_custom_type>` **(** :ref:`String<class_string>` type **)** |
  72. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`remove_export_plugin<class_EditorPlugin_remove_export_plugin>` **(** :ref:`EditorExportPlugin<class_editorexportplugin>` exporter **)** |
  74. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`remove_import_plugin<class_EditorPlugin_remove_import_plugin>` **(** :ref:`EditorImportPlugin<class_editorimportplugin>` importer **)** |
  76. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | void | :ref:`save_external_data<class_EditorPlugin_save_external_data>` **(** **)** virtual |
  78. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`set_input_event_forwarding_always_enabled<class_EditorPlugin_set_input_event_forwarding_always_enabled>` **(** **)** |
  80. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`set_state<class_EditorPlugin_set_state>` **(** :ref:`Dictionary<class_dictionary>` state **)** virtual |
  82. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`set_window_layout<class_EditorPlugin_set_window_layout>` **(** :ref:`ConfigFile<class_configfile>` layout **)** virtual |
  84. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`update_canvas<class_EditorPlugin_update_canvas>` **(** **)** |
  86. +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. Signals
  88. -------
  89. - **main_screen_changed** **(** :ref:`String<class_string>` screen_name **)**
  90. Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins.
  91. - **scene_changed** **(** :ref:`Object<class_object>` scene_root **)**
  92. Emitted when user change scene. The argument is a root node of freshly opened scene.
  93. - **scene_closed** **(** :ref:`String<class_string>` filepath **)**
  94. Emitted when user close scene. The argument is file path to a closed scene.
  95. Numeric Constants
  96. -----------------
  97. - **CONTAINER_TOOLBAR** = **0**
  98. - **CONTAINER_SPATIAL_EDITOR_MENU** = **1**
  99. - **CONTAINER_SPATIAL_EDITOR_SIDE** = **2**
  100. - **CONTAINER_SPATIAL_EDITOR_BOTTOM** = **3**
  101. - **CONTAINER_CANVAS_EDITOR_MENU** = **4**
  102. - **CONTAINER_CANVAS_EDITOR_SIDE** = **5**
  103. - **CONTAINER_PROPERTY_EDITOR_BOTTOM** = **7**
  104. - **DOCK_SLOT_LEFT_UL** = **0**
  105. - **DOCK_SLOT_LEFT_BL** = **1**
  106. - **DOCK_SLOT_LEFT_UR** = **2**
  107. - **DOCK_SLOT_LEFT_BR** = **3**
  108. - **DOCK_SLOT_RIGHT_UL** = **4**
  109. - **DOCK_SLOT_RIGHT_BL** = **5**
  110. - **DOCK_SLOT_RIGHT_UR** = **6**
  111. - **DOCK_SLOT_RIGHT_BR** = **7**
  112. - **DOCK_SLOT_MAX** = **8**
  113. Description
  114. -----------
  115. Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins.
  116. Member Function Description
  117. ---------------------------
  118. .. _class_EditorPlugin_add_control_to_bottom_panel:
  119. - :ref:`ToolButton<class_toolbutton>` **add_control_to_bottom_panel** **(** :ref:`Control<class_control>` control, :ref:`String<class_string>` title **)**
  120. Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. If your plugin is being removed, also make sure to remove your control by calling :ref:`remove_control_from_bottom_panel<class_EditorPlugin_remove_control_from_bottom_panel>`.
  121. .. _class_EditorPlugin_add_control_to_container:
  122. - void **add_control_to_container** **(** :ref:`int<class_int>` container, :ref:`Control<class_control>` control **)**
  123. Add a custom control to a container (see CONTAINER\_\* enum). There are many locations where custom controls can be added in the editor UI.
  124. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
  125. If your plugin is being removed, also make sure to remove your custom controls too.
  126. .. _class_EditorPlugin_add_control_to_dock:
  127. - void **add_control_to_dock** **(** :ref:`int<class_int>` slot, :ref:`Control<class_control>` control **)**
  128. Add the control to a specific dock slot (see DOCK\_\* enum for options).
  129. If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
  130. If your plugin is being removed, also make sure to remove your control by calling :ref:`remove_control_from_docks<class_EditorPlugin_remove_control_from_docks>`.
  131. .. _class_EditorPlugin_add_custom_type:
  132. - void **add_custom_type** **(** :ref:`String<class_string>` type, :ref:`String<class_string>` base, :ref:`Script<class_script>` script, :ref:`Texture<class_texture>` icon **)**
  133. Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
  134. When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object.
  135. You can use the :ref:`EditorPlugin.handles<class_EditorPlugin_handles>` to check if your custom object is being edited by checking the script or using 'is' keyword.
  136. During run-time, this will be a simple object with a script so this function does not need to be called then.
  137. .. _class_EditorPlugin_add_export_plugin:
  138. - void **add_export_plugin** **(** :ref:`EditorExportPlugin<class_editorexportplugin>` exporter **)**
  139. .. _class_EditorPlugin_add_import_plugin:
  140. - void **add_import_plugin** **(** :ref:`EditorImportPlugin<class_editorimportplugin>` importer **)**
  141. .. _class_EditorPlugin_add_tool_submenu_item:
  142. - void **add_tool_submenu_item** **(** :ref:`String<class_string>` name, :ref:`Object<class_object>` submenu **)**
  143. .. _class_EditorPlugin_apply_changes:
  144. - void **apply_changes** **(** **)** virtual
  145. This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency.
  146. This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
  147. .. _class_EditorPlugin_clear:
  148. - void **clear** **(** **)** virtual
  149. Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
  150. .. _class_EditorPlugin_create_spatial_gizmo:
  151. - :ref:`EditorSpatialGizmo<class_editorspatialgizmo>` **create_spatial_gizmo** **(** :ref:`Spatial<class_spatial>` for_spatial **)** virtual
  152. This is used for plugins that create gizmos used by the spatial editor. Just check that the node passed in the "for_spatial" argument matches your plugin.
  153. .. _class_EditorPlugin_edit:
  154. - void **edit** **(** :ref:`Object<class_object>` object **)** virtual
  155. This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
  156. .. _class_EditorPlugin_forward_canvas_gui_input:
  157. - :ref:`bool<class_bool>` **forward_canvas_gui_input** **(** :ref:`Transform2D<class_transform2d>` canvas_xform, :ref:`InputEvent<class_inputevent>` event **)** virtual
  158. .. _class_EditorPlugin_forward_draw_over_canvas:
  159. - void **forward_draw_over_canvas** **(** :ref:`Transform2D<class_transform2d>` canvas_xform, :ref:`Control<class_control>` canvas **)** virtual
  160. This function is called every time the 2D canvas editor draws (which overlays over the edited scene). Drawing over the supplied control will draw over the edited scene. To convert from control coordinates to edited scene coordinates (including zoom and offset), a transform is also provided. If you require this control to be redraw, call :ref:`update_canvas<class_EditorPlugin_update_canvas>`.
  161. .. _class_EditorPlugin_forward_spatial_gui_input:
  162. - :ref:`bool<class_bool>` **forward_spatial_gui_input** **(** :ref:`Camera<class_camera>` camera, :ref:`InputEvent<class_inputevent>` event **)** virtual
  163. Implement this function if you are interested in 3D view screen input events. It will be called only if currently selected node is handled by your plugin.
  164. If you would like to always gets those input events then additionally use :ref:`set_input_forwarding_always_enabled<class_EditorPlugin_set_input_forwarding_always_enabled>`.
  165. .. _class_EditorPlugin_get_breakpoints:
  166. - :ref:`PoolStringArray<class_poolstringarray>` **get_breakpoints** **(** **)** virtual
  167. This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25
  168. .. _class_EditorPlugin_get_editor_interface:
  169. - :ref:`EditorInterface<class_editorinterface>` **get_editor_interface** **(** **)**
  170. .. _class_EditorPlugin_get_plugin_name:
  171. - :ref:`String<class_string>` **get_plugin_name** **(** **)** virtual
  172. .. _class_EditorPlugin_get_state:
  173. - :ref:`Dictionary<class_dictionary>` **get_state** **(** **)** virtual
  174. Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
  175. .. _class_EditorPlugin_get_undo_redo:
  176. - :ref:`UndoRedo<class_undoredo>` **get_undo_redo** **(** **)**
  177. Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
  178. .. _class_EditorPlugin_get_window_layout:
  179. - void **get_window_layout** **(** :ref:`ConfigFile<class_configfile>` layout **)** virtual
  180. Get the GUI layout of the plugin. This is used to save the project's editor layout when the :ref:`EditorPlugin.queue_save_layout<class_EditorPlugin_queue_save_layout>` is called or the editor layout was changed(For example changing the position of a dock).
  181. .. _class_EditorPlugin_handles:
  182. - :ref:`bool<class_bool>` **handles** **(** :ref:`Object<class_object>` object **)** virtual
  183. Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions :ref:`EditorPlugin.edit<class_EditorPlugin_edit>` and :ref:`EditorPlugin.make_visible<class_EditorPlugin_make_visible>` called when the editor requests them.
  184. .. _class_EditorPlugin_has_main_screen:
  185. - :ref:`bool<class_bool>` **has_main_screen** **(** **)** virtual
  186. Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script).
  187. .. _class_EditorPlugin_hide_bottom_panel:
  188. - void **hide_bottom_panel** **(** **)**
  189. .. _class_EditorPlugin_make_bottom_panel_item_visible:
  190. - void **make_bottom_panel_item_visible** **(** :ref:`Control<class_control>` item **)**
  191. .. _class_EditorPlugin_make_visible:
  192. - void **make_visible** **(** :ref:`bool<class_bool>` visible **)** virtual
  193. This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
  194. Remember that you have to manage the visibility of all your editor controls manually.
  195. .. _class_EditorPlugin_queue_save_layout:
  196. - void **queue_save_layout** **(** **)** const
  197. Queue save the project's editor layout.
  198. .. _class_EditorPlugin_remove_control_from_bottom_panel:
  199. - void **remove_control_from_bottom_panel** **(** :ref:`Control<class_control>` control **)**
  200. Remove the control from the bottom panel. Don't forget to call this if you added one, so the editor can remove it cleanly.
  201. .. _class_EditorPlugin_remove_control_from_docks:
  202. - void **remove_control_from_docks** **(** :ref:`Control<class_control>` control **)**
  203. Remove the control from the dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly.
  204. .. _class_EditorPlugin_remove_custom_type:
  205. - void **remove_custom_type** **(** :ref:`String<class_string>` type **)**
  206. Remove a custom type added by :ref:`EditorPlugin.add_custom_type<class_EditorPlugin_add_custom_type>`
  207. .. _class_EditorPlugin_remove_export_plugin:
  208. - void **remove_export_plugin** **(** :ref:`EditorExportPlugin<class_editorexportplugin>` exporter **)**
  209. .. _class_EditorPlugin_remove_import_plugin:
  210. - void **remove_import_plugin** **(** :ref:`EditorImportPlugin<class_editorimportplugin>` importer **)**
  211. .. _class_EditorPlugin_save_external_data:
  212. - void **save_external_data** **(** **)** virtual
  213. This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
  214. .. _class_EditorPlugin_set_input_event_forwarding_always_enabled:
  215. - void **set_input_event_forwarding_always_enabled** **(** **)**
  216. Use this method if you always want to receive inputs from 3D view screen inside :ref:`forward_spatial_gui_input<class_EditorPlugin_forward_spatial_gui_input>`. It might be especially usable if your plugin will want to use raycast in the scene.
  217. .. _class_EditorPlugin_set_state:
  218. - void **set_state** **(** :ref:`Dictionary<class_dictionary>` state **)** virtual
  219. Restore the state saved by :ref:`EditorPlugin.get_state<class_EditorPlugin_get_state>`.
  220. .. _class_EditorPlugin_set_window_layout:
  221. - void **set_window_layout** **(** :ref:`ConfigFile<class_configfile>` layout **)** virtual
  222. Restore the plugin GUI layout saved by :ref:`EditorPlugin.get_window_layout<class_EditorPlugin_get_window_layout>`.
  223. .. _class_EditorPlugin_update_canvas:
  224. - void **update_canvas** **(** **)**
  225. Updates the control used to draw the edited scene over the 2D canvas. This is used together with :ref:`forward_canvas_input_event<class_EditorPlugin_forward_canvas_input_event>`.