Fixed PickupItem scenes to spawn their item child scenes.

main
Martin Felis 2024-08-15 21:13:09 +02:00
parent b8cb77f613
commit 256cd4f1f3
1 changed files with 4 additions and 4 deletions

View File

@ -11,12 +11,12 @@ var editor_child_scene:Node3D = null
if value != item: if value != item:
item = value item = value
if not Engine.is_editor_hint():
return
if editor_child_scene != null: if editor_child_scene != null:
editor_child_scene.queue_free() editor_child_scene.queue_free()
if not Engine.is_editor_hint():
return
editor_child_scene = item.scene.instantiate() editor_child_scene = item.scene.instantiate()
add_child(editor_child_scene) add_child(editor_child_scene)
editor_child_scene.owner = self editor_child_scene.owner = self