How do i change scene to an instanced scene?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Socrates

I have a scene that generates random levels, and another scene that lets you select the difficulty of the randomly generated level. But i can’t figure out how to change the scene to an instanced scene (rather than changing it to the path of the scene).

:bust_in_silhouette: Reply From: sxkod

May be I misunderstood but is it get_tree().change_scene_to() ?

Note that change_scene_to() takes a PackedScene as an argument, not an instance.

See also Background loading in the docs for more about changing scenes.

kidscancode | 2018-08-16 03:07