Fix incorrect usage for some export variables

This commit is contained in:
Haoyu Qiu 2022-04-29 18:29:26 +08:00 committed by Relintai
parent b9fb0ae733
commit cdeba9e5d1

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;