mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +08:00
[godot] Closes #2243, custom resource types returned incorrect values from get_resource_type().
This commit is contained in:
parent
7a861dc605
commit
d9fff16b5f
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user