Merge pull request #4895 from TheoXD/_fix_interactive_loader_cache

fixed interactive_loader() not returning a cached scene
This commit is contained in:
Juan Linietsky 2016-06-06 20:35:54 -03:00
commit 82b759d938
1 changed files with 5 additions and 1 deletions

View File

@ -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())