Skip to content

Commit 7f110a6

Browse files
committed
Merge pull request #108558 from KoBeWi/variant_of_the_lost
Fix Variant properties losing value upon script update
2 parents 00b9e53 + 188e313 commit 7f110a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/object/script_language.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c
795795
StringName n = E.name;
796796
new_values.insert(n);
797797

798-
if (!values.has(n) || values[n].get_type() != E.type) {
798+
if (!values.has(n) || (E.type != Variant::NIL && values[n].get_type() != E.type)) {
799799
if (p_values.has(n)) {
800800
values[n] = p_values[n];
801801
}

0 commit comments

Comments
 (0)