mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Merge pull request #43564 from zaevi/fix_loader_saver_broken
Fix custom loader/savers broken
This commit is contained in:
commit
ff4ca81d0b
@ -1057,7 +1057,7 @@ bool ResourceLoader::add_custom_resource_format_loader(String script_path) {
|
||||
|
||||
ERR_FAIL_COND_V_MSG(obj == nullptr, false, "Cannot instance script as custom resource loader, expected 'ResourceFormatLoader' inheritance, got: " + String(ibt) + ".");
|
||||
|
||||
ResourceFormatLoader *crl = Object::cast_to<ResourceFormatLoader>(obj);
|
||||
Ref<ResourceFormatLoader> crl = Object::cast_to<ResourceFormatLoader>(obj);
|
||||
crl->set_script(s);
|
||||
ResourceLoader::add_resource_format_loader(crl);
|
||||
|
||||
|
@ -214,7 +214,7 @@ bool ResourceSaver::add_custom_resource_format_saver(String script_path) {
|
||||
|
||||
ERR_FAIL_COND_V_MSG(obj == nullptr, false, "Cannot instance script as custom resource saver, expected 'ResourceFormatSaver' inheritance, got: " + String(ibt) + ".");
|
||||
|
||||
ResourceFormatSaver *crl = Object::cast_to<ResourceFormatSaver>(obj);
|
||||
Ref<ResourceFormatSaver> crl = Object::cast_to<ResourceFormatSaver>(obj);
|
||||
crl->set_script(s);
|
||||
ResourceSaver::add_resource_format_saver(crl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user