Merge pull request #89175 from paulloz/dotnet/fix-exported-nodes-reset-without-build-artifacts

Hint fallback property as node when it is a node
This commit is contained in:
Rémi Verschelde 2024-03-06 13:32:00 +01:00 committed by GitHub
commit 9b94c80e9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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));
}
}