summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheoXD <redsymbzone@hotmail.com>2016-05-30 01:22:00 +0200
committerTheoXD <redsymbzone@hotmail.com>2016-05-30 02:47:33 +0200
commit47bd1e868893c6ad8cd56b591115b181726b7b93 (patch)
tree88f8f16c3ab8e696789e588e3f3a52ad2dbafc5d
parente0e52055bc6dd76ab26ca9f914631b351ba49ff9 (diff)
fixed interactive_loader() not returning a cached scene
-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())