how to make the player persistent between scene?

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

is there any way to make the player persistent between 2 scenes (like in GameMakerStudio) or I have to make a player nod for each scene when I change my level? (any tutorial link would be helpful. thank you)

:bust_in_silhouette: Reply From: sparkart

What you could do is have a singleton node and you would remove your player from the current scene and then attach it to that singleton node.

Create a new scene, call it maybe: “GLOBAL.tscn”

Go to Project > Project Settings > AutoLoad
Select the scene and enable “singleton”

You can also use the singleton node to store global variables.

:bust_in_silhouette: Reply From: Xadlas


Here is the link to Sigletons and it’s usage.

Singletons Dokumentation