godotengine / godotengine/godot-docs
Scene recognizes @tool only on open
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**Godot version:** v4.3.stable.official [77dcf97d8]
**Issue description:**
When adding (or removing) the `@tool`-tag from a script, opened scenes don't detect the change automatically.
Only when closing and reopening a scene, the scene correctly detects the added/removed `@tool`.
**Documentation Page:** [Running code in the editor](https://docs.godotengine.org/en/4.3/tutorials/plugins/running_code_in_the_editor.html)
**Steps:**
1. Create a scene
2. Add the script to the scene
* Add `@tool` to the start of the script
* Add `print("Hello")` to the `_process` function
3. Switch back to the scene -> no 'Hello' appears in the console
4. Close and reopen the scene -> 'Hello' appears in the console
```gdscript
@tool
extends Node2D
func _process(delta: float) -> void:
print("Hello")
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.