Merge pull request #108558 from KoBeWi/variant_of_the_lost

Fix Variant properties losing value upon script update
This commit is contained in:
Thaddeus Crews 2025-07-15 16:58:35 -05:00
commit 7f110a6c3e
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -795,7 +795,7 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c
StringName n = E.name;
new_values.insert(n);
if (!values.has(n) || values[n].get_type() != E.type) {
if (!values.has(n) || (E.type != Variant::NIL && values[n].get_type() != E.type)) {
if (p_values.has(n)) {
values[n] = p_values[n];
}