From 256cd4f1f32fb6616e9186e0f9b69718b2a04b1e Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Thu, 15 Aug 2024 21:13:09 +0200 Subject: [PATCH] Fixed PickupItem scenes to spawn their item child scenes. --- objects/pickup_item.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/objects/pickup_item.gd b/objects/pickup_item.gd index 2f6433a..420201f 100644 --- a/objects/pickup_item.gd +++ b/objects/pickup_item.gd @@ -11,12 +11,12 @@ var editor_child_scene:Node3D = null if value != item: item = value - if not Engine.is_editor_hint(): - return - if editor_child_scene != null: editor_child_scene.queue_free() - + + if not Engine.is_editor_hint(): + return + editor_child_scene = item.scene.instantiate() add_child(editor_child_scene) editor_child_scene.owner = self