From e433e7a40b862b2fd1b1e5b1e60141f7e6599ed3 Mon Sep 17 00:00:00 2001 From: N0hbdy Date: Tue, 31 Dec 2019 16:01:06 -0800 Subject: [PATCH] Add warning to making-plugins reminding about tool keyword I've repeatedly forgotten that other scripts used in editor plugins *also* need to have the `tool` keyword, otherwise it fails to correctly run. --- tutorials/plugins/editor/making_plugins.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tutorials/plugins/editor/making_plugins.rst b/tutorials/plugins/editor/making_plugins.rst index f2088ac18..914d0f905 100644 --- a/tutorials/plugins/editor/making_plugins.rst +++ b/tutorials/plugins/editor/making_plugins.rst @@ -72,6 +72,11 @@ EditorPlugin script for you. The script has two requirements that you cannot change: it must be a ``tool`` script, or else it will not load properly in the editor, and it must inherit from :ref:`class_EditorPlugin`. +.. warning:: + In addition to the EditorPlugin script, any other GDScript that your plugin uses + must *also* be a tool. Any GDScript without ``tool`` imported into the editor + will act like an empty file! + It's important to deal with initialization and clean-up of resources. A good practice is to use the virtual function :ref:`_enter_tree() ` to initialize your plugin and