Fix references to the @tool annotation

This commit is contained in:
Evanaellio
2022-09-21 22:48:04 +02:00
parent 84278a443a
commit 3cb674285e
4 changed files with 7 additions and 7 deletions

View File

@@ -167,7 +167,7 @@ To create a new node type, you can use the function
:ref:`class_EditorPlugin` class. This function can add new types to the editor
(nodes or resources). However, before you can create the type, you need a script
that will act as the logic for the type. While that script doesn't have to use
the ``@tool`` keyword, it can be added so the script runs in the editor.
the ``@tool`` annotation, it can be added so the script runs in the editor.
For this tutorial, we'll create a button that prints a message when
clicked. For that, we'll need a script that extends from

View File

@@ -36,7 +36,7 @@ use cases:
How to use it
-------------
To turn a script into a tool, add the keyword ``@tool`` at the top of your code.
To turn a script into a tool, add the ``@tool`` annotation at the top of your code.
To check if you are currently in the editor, use: ``Engine.is_editor_hint()``.
@@ -351,6 +351,6 @@ If you are using :ref:`EditorScript<class_EditorScript>`:
.. warning::
Using ``@tool`` improperly can yield many errors. It is advised to first
write the code how you want it, and only then add the ``@tool`` keyword to
write the code how you want it, and only then add the ``@tool`` annotation to
the top. Also, make sure to separate code that runs in-editor from code that
runs in-game. This way, you can find bugs more easily.