summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-06 20:35:54 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-06 20:35:54 -0300
commit82b759d9388b8d64323b9f8cd61ae7a8691e4b8a (patch)
treee809e6e28bb73030f98d18116400b3cfac9c8e1a /core/io
parent736b65e56605c5b50ddb48cc29d3fa457a3580a5 (diff)
parent47bd1e868893c6ad8cd56b591115b181726b7b93 (diff)
Merge pull request #4895 from TheoXD/_fix_interactive_loader_cache
fixed interactive_loader() not returning a cached scene
Diffstat (limited to 'core/io')
-rw-r--r--core/io/resource_loader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index b547dc0e85..1bb80e74eb 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -319,7 +319,11 @@ Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_
if (OS::get_singleton()->is_stdout_verbose())
print_line("load resource: "+local_path+" (cached)");
- return RES( ResourceCache::get(local_path ) );
+ Ref<Resource> res_cached = ResourceCache::get(local_path);
+ Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault));
+
+ ril->resource = res_cached;
+ return ril;
}
if (OS::get_singleton()->is_stdout_verbose())