Merge pull request #41238 from MarianoGnu/gdscript-export-resource
Fix GdScript Analyzier not detecting Resource subclass correctly
This commit is contained in:
commit
58f5c2bab6
|
@ -540,6 +540,7 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
|
||||||
break;
|
break;
|
||||||
case GDScriptParser::DataType::NATIVE:
|
case GDScriptParser::DataType::NATIVE:
|
||||||
if (ClassDB::is_parent_class(get_real_class_name(datatype.native_type), "Resource")) {
|
if (ClassDB::is_parent_class(get_real_class_name(datatype.native_type), "Resource")) {
|
||||||
|
member.variable->export_info.hint = PROPERTY_HINT_RESOURCE_TYPE;
|
||||||
member.variable->export_info.hint_string = get_real_class_name(datatype.native_type);
|
member.variable->export_info.hint_string = get_real_class_name(datatype.native_type);
|
||||||
} else {
|
} else {
|
||||||
push_error(R"(Export type can only be built-in or a resource.)", member.variable);
|
push_error(R"(Export type can only be built-in or a resource.)", member.variable);
|
||||||
|
|
Loading…
Reference in New Issue