diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-08-31 18:57:03 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-08-31 18:57:44 -0300 |
commit | d39e79e7ec8e010c251d9df3ece7cb7675a2c7a5 (patch) | |
tree | 1348dd251d9dc6977b57b078369a2575e8805ab3 /core/io/resource_format_binary.cpp | |
parent | 909c1fd120b58155e4f7b78d60b19a9f13528e07 (diff) | |
download | redot-engine-d39e79e7ec8e010c251d9df3ece7cb7675a2c7a5.tar.gz |
Fix issues regarding reload of resources in imported scenes. Closes #10017
Diffstat (limited to 'core/io/resource_format_binary.cpp')
-rw-r--r-- | core/io/resource_format_binary.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 965d11e414..f44492248e 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1005,7 +1005,7 @@ ResourceInteractiveLoaderBinary::~ResourceInteractiveLoaderBinary() { memdelete(f); } -Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(const String &p_path, Error *r_error) { +Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) { if (r_error) *r_error = ERR_FILE_CANT_OPEN; @@ -1019,7 +1019,8 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(cons } Ref<ResourceInteractiveLoaderBinary> ria = memnew(ResourceInteractiveLoaderBinary); - ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path); + String path = p_original_path != "" ? p_original_path : p_path; + ria->local_path = ProjectSettings::get_singleton()->localize_path(path); ria->res_path = ria->local_path; //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); ria->open(f); |