diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2024-03-06 13:32:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 13:32:00 +0100 |
commit | 9b94c80e9aff2a4f363ae6d8e2bbe837aa5876bc (patch) | |
tree | 1e12fd25566546c6a3a4324a1fb4c0482cf8c13b /core | |
parent | ec55028f2621e4e34344af9adec646a3685b8291 (diff) | |
parent | e7c90e088401d36ba67ff81c03790687a6cdee03 (diff) | |
download | redot-engine-9b94c80e9aff2a4f363ae6d8e2bbe837aa5876bc.tar.gz |
Merge pull request #89175 from paulloz/dotnet/fix-exported-nodes-reset-without-build-artifacts
Hint fallback property as node when it is a node
Diffstat (limited to 'core')
-rw-r--r-- | core/object/script_language.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index d358a8d2a0..693c6819d4 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -715,7 +715,12 @@ void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name, } } if (!found) { - properties.push_back(PropertyInfo(p_value.get_type(), p_name, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_SCRIPT_VARIABLE)); + PropertyHint hint = PROPERTY_HINT_NONE; + const Object *obj = p_value.get_validated_object(); + if (obj && obj->is_class("Node")) { + hint = PROPERTY_HINT_NODE_TYPE; + } + properties.push_back(PropertyInfo(p_value.get_type(), p_name, hint, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_SCRIPT_VARIABLE)); } } |