1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-25 09:34:24 +00:00

Fix spawner sometimes failing to spawn

This commit is contained in:
Steffo 2024-04-15 21:51:24 +02:00
parent 8ed5cccabb
commit 0c2cefb255
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -11,7 +11,7 @@ func spawn():
entity.global_scale = global_scale entity.global_scale = global_scale
entity.global_position = global_position entity.global_position = global_position
entity.global_rotation = global_rotation entity.global_rotation = global_rotation
parent.add_child(entity) parent.add_child.call_deferred(entity) # Not sure why this is needed.
func _ready(): func _ready():
if parent == null: if parent == null: