Skip to content

Commit

Permalink
Merge pull request #9101 from skyace65/Tool-Info
Browse files Browse the repository at this point in the history
Add more tool script info and add a section
  • Loading branch information
mhilbrunner committed Mar 17, 2024
2 parents ad78859 + 49d3e3e commit 7c54d22
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tutorials/plugins/editor/making_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ 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
must *also* be a tool. Any GDScript without ``@tool`` used by the editor
will act like an empty file!

It's important to deal with initialization and clean-up of resources.
Expand Down
20 changes: 11 additions & 9 deletions tutorials/plugins/running_code_in_the_editor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,20 @@ Here is how a ``_process()`` function might look for you:
// Code to execute both in editor and in game.
}

.. note::
Important information
---------------------

Modifications in the editor are permanent. For example, in the following
case, when we remove the script, the node will keep its rotation. Be careful
to avoid making unwanted modifications.
Any other GDScript that your tool script uses must *also* be a tool. Any
GDScript without ``@tool`` used by the editor will act like an empty file!

.. note::
Extending a ``@tool`` script does not automatically make the extending script
a ``@tool``. Omitting ``@tool`` from the extending script will disable tool
behavior from the super class. Therefore the extending script should also
specify the ``@tool`` annotation.

Extending a ``@tool`` script does not automatically make the extending script
a ``@tool``. Omitting ``@tool`` from the extending script will disable tool
behavior from the super class. Therefore the extending script should also
specify the ``@tool`` annotation.
Modifications in the editor are permanent. For example, in the next
section when we remove the script, the node will keep its rotation. Be careful
to avoid making unwanted modifications.

Try ``@tool`` out
-----------------
Expand Down

0 comments on commit 7c54d22

Please sign in to comment.