-Implemented Proxy Textures (needed to solve the problem with ViewportTexture)

-Properly use hierarchy to initialize resources local to scene (solves problem of GUI in 3D)
This commit is contained in:
Juan Linietsky 2017-12-04 15:55:20 -03:00
parent faaa012b84
commit d438ac0aed
15 changed files with 109 additions and 14 deletions

View file

@ -232,11 +232,11 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
Node *base = i == 0 ? node : ret_nodes[0];
if (p_edit_state == GEN_EDIT_STATE_MAIN) {
res->local_scene = base;
resources_local_to_scene[res] = res;
//for the main scene, use the resource as is
res->configure_for_local_scene(base, resources_local_to_scene);
} else {
//for instances, a copy must be made
Node *base = i == 0 ? node : ret_nodes[0];
Ref<Resource> local_dupe = res->duplicate_for_local_scene(base, resources_local_to_scene);
resources_local_to_scene[res] = local_dupe;