var scene = preload("res://Scenes/MyScene.tscn")
var node = scene.instance()
get_parent().add_child(node)
# Doesn't work. get_parent() returns a viable object, but the node won't get parented to it. When I check the parent of the node it returns null, and debugger gets overflown with errors of this type: C Error: Condition ' !is_inside_tree() ' is true. returned: get_transform()
add_child(node)
# But this works fine
I just can't get what's wrong with it. Maybe I'm not seeing something obvious? Is it a known bug? If so I couldn't find a corresponding issue. Is this an intended behaviour? This is incredibly frustrating:(