1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-21 23:54:23 +00:00

Spawner: Don't spawn anything if no scene is set

This commit is contained in:
Steffo 2024-04-29 01:23:31 +02:00
parent c423369de3
commit 91c94d91eb
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -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