https://docs.godotengine.org/en/stable/tutorials/plugins/running_code_in_the_editor.html
Running code in the editor — Godot Engine (stable) documentation in English
What is@tool?:@tool is a powerful line of code that, when added at the top of your script, makes it execute in the editor. You can also decide which parts of...
running code in the editorgodot engine