Merge pull request #43539 from zaevi/3.2_fix_loader_saver_broken
[3.2] Fix custom loader/savers broken
This commit is contained in:
commit
aeb3557f94
2 changed files with 2 additions and 2 deletions
|
@ -956,7 +956,7 @@ bool ResourceLoader::add_custom_resource_format_loader(String script_path) {
|
||||||
|
|
||||||
ERR_FAIL_COND_V_MSG(obj == NULL, false, "Cannot instance script as custom resource loader, expected 'ResourceFormatLoader' inheritance, got: " + String(ibt) + ".");
|
ERR_FAIL_COND_V_MSG(obj == NULL, 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.get_ref_ptr());
|
crl->set_script(s.get_ref_ptr());
|
||||||
ResourceLoader::add_resource_format_loader(crl);
|
ResourceLoader::add_resource_format_loader(crl);
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ bool ResourceSaver::add_custom_resource_format_saver(String script_path) {
|
||||||
|
|
||||||
ERR_FAIL_COND_V_MSG(obj == NULL, false, "Cannot instance script as custom resource saver, expected 'ResourceFormatSaver' inheritance, got: " + String(ibt) + ".");
|
ERR_FAIL_COND_V_MSG(obj == NULL, 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.get_ref_ptr());
|
crl->set_script(s.get_ref_ptr());
|
||||||
ResourceSaver::add_resource_format_saver(crl);
|
ResourceSaver::add_resource_format_saver(crl);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue