![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Titox |
How can I get a node in a scene and chnage it to another node by instancing the node
i tried this but it didn’t really work.But it suprisingly printed the correct instanced sprite that I expected it to:
func _ready():
var sprite = get_child(3)
sprite = load("res://assets/super_platforms/slide_and_slope_straight.tscn").instance() #the same sprite remains
print(
sprite.name
)# it prints out the root node of the instanced scene,which is part of what its supposed to do