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 /scene/resources/scene_format_text.cpp | |
parent | 909c1fd120b58155e4f7b78d60b19a9f13528e07 (diff) |
Fix issues regarding reload of resources in imported scenes. Closes #10017
Diffstat (limited to 'scene/resources/scene_format_text.cpp')
-rw-r--r-- | scene/resources/scene_format_text.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp index fea5c11dec..14e2ef83f8 100644 --- a/scene/resources/scene_format_text.cpp +++ b/scene/resources/scene_format_text.cpp @@ -891,7 +891,7 @@ String ResourceInteractiveLoaderText::recognize(FileAccess *p_f) { ///////////////////// -Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const String &p_path, Error *r_error) { +Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) { if (r_error) *r_error = ERR_CANT_OPEN; @@ -905,7 +905,8 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const } Ref<ResourceInteractiveLoaderText> ria = memnew(ResourceInteractiveLoaderText); - 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( ProjectSettings::get_singleton()->localize_path(p_path) ); ria->open(f); |