SaveFile System - How do I connect it to different Scenes?

Godot Version

4.3

Question

`Hello GDots… I am currently working on a SaveSystem (I won’t lie I watched a tutorial to learn how to do it… And I know the SaveSystem works, but the saveGame() and loadGame() functions are written in its own script and I want to use saveGame() when someone presses Logout and loadGame when someone presses Login.

Basically, saveGame() and loadGame() will be used in 2 different Scenes and their coding is in an independent script not attached to any Scene

How would I go about doing this?

**EDIT: Oh Yeah, this is my code:

`

Can you make them static? Alternatively make your class an AutoLoad.

Definitely make them an autoload. You can achieve this by going to project settings → globals → autoload. Link the script with the functions and give your class a name. You can now call it by doing this: AutoloadName.saveGame()

2 Likes

Thx for your help guys.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.