Skip to content

Commit

Permalink
GH-190 Do not cache instantiated scene node
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Mar 23, 2024
1 parent fdec82f commit 5e36291
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/script/nodes/scene/instantiate_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class OScriptNodeInstantiateSceneInstance : public OScriptNodeInstance
DECLARE_SCRIPT_NODE_INSTANCE(OScriptNodeInstantiateScene);
String _scene_name;
Ref<PackedScene> _scene;
Node* _scene_node;

public:
int step(OScriptNodeExecutionContext& p_context) override
Expand All @@ -38,10 +37,10 @@ class OScriptNodeInstantiateSceneInstance : public OScriptNodeInstance
p_context.set_error(GDEXTENSION_CALL_ERROR_INVALID_METHOD, "Failed to load scene");
return -1;
}
_scene_node = _scene->instantiate();
}

p_context.set_output(0, _scene_node);
Node* scene_node = _scene->instantiate();
p_context.set_output(0, scene_node);
return 0;
}
};
Expand Down

0 comments on commit 5e36291

Please sign in to comment.