[godot] Closes #2243, custom resource types returned incorrect values from get_resource_type().

This commit is contained in:
Mario Zechner 2023-02-13 07:42:06 +01:00
parent 7a861dc605
commit d9fff16b5f
2 changed files with 2 additions and 2 deletions

View File

@ -247,7 +247,7 @@ void SpineAtlasResourceFormatLoader::get_recognized_extensions(List<String> *ext
}
String SpineAtlasResourceFormatLoader::get_resource_type(const String &path) const {
return "SpineAtlasResource";
return path.ends_with("spatlas") || path.ends_with(".atlas") ? "SpineAtlasResource" : "";
}
bool SpineAtlasResourceFormatLoader::handles_type(const String &type) const {

View File

@ -174,7 +174,7 @@ void SpineSkeletonFileResourceFormatLoader::get_recognized_extensions(List<Strin
}
String SpineSkeletonFileResourceFormatLoader::get_resource_type(const String &path) const {
return "SpineSkeletonFileResource";
return path.ends_with(".spjson") || path.ends_with(".spskel") || path.ends_with(".spine-json") || path.ends_with(".skel") ? "SpineSkeletonFileResource" : "";
}
bool SpineSkeletonFileResourceFormatLoader::handles_type(const String &type) const {