From 91c94d91ebf32e2c75948bfa3d58b0d2522ef6e9 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 29 Apr 2024 01:23:31 +0200 Subject: [PATCH] `Spawner`: Don't spawn anything if no scene is set --- behaviours/spawner.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/behaviours/spawner.gd b/behaviours/spawner.gd index fbf5d8a..6559a05 100644 --- a/behaviours/spawner.gd +++ b/behaviours/spawner.gd @@ -30,6 +30,9 @@ func spawn(): target = MainGame.get_via_group(self).default_spawn_parent if not target: target = self + if not scene: + Log.w(self, "Not spawning, no scene is set.") + return var entity = scene.instantiate() entity.global_scale = global_scale entity.global_position = global_position