Skip to content

Commit 9b94c80

Browse files
authored
Merge pull request #89175 from paulloz/dotnet/fix-exported-nodes-reset-without-build-artifacts
Hint fallback property as node when it is a node
2 parents ec55028 + e7c90e0 commit 9b94c80

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/object/script_language.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,12 @@ void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name,
715715
}
716716
}
717717
if (!found) {
718-
properties.push_back(PropertyInfo(p_value.get_type(), p_name, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_SCRIPT_VARIABLE));
718+
PropertyHint hint = PROPERTY_HINT_NONE;
719+
const Object *obj = p_value.get_validated_object();
720+
if (obj && obj->is_class("Node")) {
721+
hint = PROPERTY_HINT_NODE_TYPE;
722+
}
723+
properties.push_back(PropertyInfo(p_value.get_type(), p_name, hint, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_SCRIPT_VARIABLE));
719724
}
720725
}
721726

0 commit comments

Comments
 (0)