0 votes

I am new to godot i moved from unity to godot and now I wan my game to change between different scene and also during change not to loose some of the data needed how to do it ? i have about singlton in godot manual but I am not able to understand it and It will be really helpful for me if you can please .

in Engine by (12 points)

1 Answer

0 votes

just write a script. Go to project settings autoload. create new autoload provide the script file and choose a name. Set as singleton.

Now you can access the script from everywhere under the given name.

by (4,084 points)
How to make a singleton in one scene
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.