Godot Version
4.3.beta1 but happens on the newest beta and 4.2 too.
Question
Hey. I’m using the LDTK importer for Godot to create my levels. Just started working on an entity importer. When instantiating any object from the entity importer, a duplicate of it’s children is created.
All I found about the same issue is about scene inheritance. I am not using scene inheritance (at least not purposefully). What I’m doing is in a post-import script, I am instantiating the corresponding .tscn file as the child of the level.
ALSO as you can see, the PackedScene is instantiated as a scene, too, as it can be opened with the little scene button at the right. But for whatever reason it’s children are also instantiated into the scene in which the PackedScene is instantiated.
Here’s the code:
match entity["identifier"]:
"Bed":
var b : PackedScene = load("res://prefabs/imported/bed.tscn")
var bed_instance = b.instantiate()
entity_layer.add_child(bed_instance)
bed_instance.position = entity["position"]
I’d imagine this to be quite a common issue. It’s strange. Help very much appreciated. Thank you!