saving a node data in a global variable

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

hello everyone.

i wanted to know if i have a scene with a node in it and save that node to a variable in my autoload singleton, if i do free() the scene, the node data on my singleton woud get deleted too right?, which would be the best way to save that node or the data it contains?


:bust_in_silhouette: Reply From: code

i dont think that the node data on your autoload script will be deleted, u just have to create a new variable in your autoload script save the data of the node u want to save in the variable so if anything happen to the node u can just call the variable in your autoload to retrive your data