scene changers should be clearing all spawned objects on scene exit

This commit is contained in:
derek
2025-04-03 16:59:46 -05:00
parent 0c76ba47f7
commit 32b9efbd92
3 changed files with 6 additions and 4 deletions

View File

@@ -27,6 +27,10 @@ func _on_body_entered(body: Node3D) -> void:
for i in spawned_stuff:
i.queue_free()
func clear_spawned_objects():
for i in get_tree().current_scene:
if i.is_in_group("spawned"):
i.queue_free()
func _on_start_activation_timeout() -> void:
active = true