Merge pull request #60626 from timothyqiu/missing-sv-usage

This commit is contained in:
Rémi Verschelde 2022-05-02 09:53:48 +02:00 committed by GitHub
commit 5c79239e12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4914,6 +4914,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
if (autoexport && member.data_type.has_type) {
if (member.data_type.kind == DataType::BUILTIN) {
member._export.type = member.data_type.builtin_type;
member._export.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE;
} else if (member.data_type.kind == DataType::NATIVE) {
if (ClassDB::is_parent_class(member.data_type.native_type, "Resource")) {
member._export.type = Variant::OBJECT;