Skip to content

Commit 189725b

Browse files
committed
Block Canvas: Reuse saved block scene resource
By simply assigning it to the scene resource property when loading the tree. Follow up of 01ab76c which already removed all resource regeneration except when loading the canvas.
1 parent d008f06 commit 189725b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/block_code/ui/block_canvas/block_canvas.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ func load_tree(parent: Node, node: SerializedBlockTreeNode):
164164
var scene: Block = load(_block_scene_path).instantiate()
165165
for prop_pair in node.serialized_block.serialized_props:
166166
scene.set(prop_pair[0], prop_pair[1])
167+
scene.resource = node
167168
parent.add_child(scene)
168169

169170
var scene_block: Block = scene as Block

0 commit comments

Comments
 (0)