Open KoBeWi opened 2 years ago
Addition: this bug occurs after restarting the editor (no reset buttons). After saving the scene, the inspector starts working correctly again.
I could not reproduce the bug with saving default values for nodes. Only for resources ([sub_resource]
), but seems to be an old bug not related to @tool
.
Just a few pictures to illustrate what happens when adding @tool
later, with numerical properties:
# keep commented out for now
#@tool
class_name Arena
extends Node2D
@export var tilemap_cell_size: float = 16.0
@export var tilemap_width: int = 72
@export var tilemap_height: int = 37
Create Arena node, change properties to see revert arrow button appear:
Then uncomment @tool
at the top of the script. Issue won't appear at once, but after editor reboot, revert buttons disappeared:
Oddly enough, in the reverse way, if you temporarily comment out @tool
, the reset to default buttons will reappear immediately, and not disappear even if you uncomment @tool
until next reboot.
So my current workaround is to comment @tool
once during my work session if I need to revert the properties at some point.
Godot version
ecf1877
System information
Windows 10 x64
Issue description
test
will have value saved to scene even when it's not changed. It will save 0. The revert arrow appears, but clicking it does nothing.Steps to reproduce
@tool
scriptMinimal reproduction project
No response