godot
godot copied to clipboard
Exporting Node variable can't trigger setget in tool mode.
Godot version
4.0 beta 6
System information
This is system-independent.
Issue description
As title.
This is because when the exported node variable a_variable
is modified, the editor actually modifies the variable metadata/_ editor_prop_ptr_a_variable
, so the setget
defined in the @ tool
script does not work.
Steps to reproduce
@tool
extends Node
@export var a_export_node: Node :
set(v):
print("set!")
a_export_node = v
Minimal reproduction project
very easy to reproduce.