diff options
Diffstat (limited to 'doc/classes/EditorScript.xml')
-rw-r--r-- | doc/classes/EditorScript.xml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml index e342966fe8..1cdf192027 100644 --- a/doc/classes/EditorScript.xml +++ b/doc/classes/EditorScript.xml @@ -4,7 +4,7 @@ Base script that can be used to add extension functions to the editor. </brief_description> <description> - Scripts extending this class and implementing its [method _run] method can be executed from the Script Editor's [b]File > Run[/b] menu option (or by pressing [kbd]Ctrl + Shift + X[/kbd]) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using [EditorPlugin]s instead. + Scripts extending this class and implementing its [method _run] method can be executed from the Script Editor's [b]File > Run[/b] menu option (or by pressing [kbd]Ctrl + Shift + X[/kbd]) while the editor is running. This is useful for adding custom in-editor functionality to Redot. For more complex additions, consider using [EditorPlugin]s instead. [b]Note:[/b] Extending scripts need to have [code]tool[/code] mode enabled. [b]Example:[/b] Running the following script prints "Hello from the Godot Editor!": [codeblocks] @@ -13,22 +13,22 @@ extends EditorScript func _run(): - print("Hello from the Godot Editor!") + print("Hello from the Redot Editor!") [/gdscript] [csharp] - using Godot; + using Redot; [Tool] public partial class HelloEditor : EditorScript { public override void _Run() { - GD.Print("Hello from the Godot Editor!"); + GD.Print("Hello from the Redot Editor!"); } } [/csharp] [/codeblocks] - [b]Note:[/b] The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Godot [b]Output[/b] dock. + [b]Note:[/b] The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Redot [b]Output[/b] dock. [b]Note:[/b] EditorScript is [RefCounted], meaning it is destroyed when nothing references it. This can cause errors during asynchronous operations if there are no references to the script. </description> <tutorials> |