The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+1 vote

According to the Node.set_owner() documentation:

When saving a node (using SceneSaver) all the nodes it owns will be saved with it

Does SceneSaver exists or should we use the method the documentation explains to load and save games?

in Engine by (659 points)

Looks like SceneSaver is now ResourceSaver...

2 Answers

+4 votes
Best answer

After a few test, I found a way to save a node to scn

var scene =
var result = scene.pack(child)
if result == OK:"res://path/name.scn", scene) // or user://...

I think this will save current node status to scn file,
and probably reconstruct all when load.

by (9,800 points)
selected by

Yes :)
This is what I used a while ago to generate a lot of sprite nodes out of a tilesheet.

Interesting. PackedScene documentation brings to other new resource to me: SceneState which shows when reading his members what's saved with he scene:

  • Nodes count
  • Node type, name, path by node index
  • Whether node is a placeholder and its instance
  • Nodes groups
  • Nodes properties
  • Nodes connections and signals (methods and flags)


and the "res://path/name.scn", scene) // or user:// is loaded when you load your game? or how does it works?

0 votes

SceneSaver seems no longer exists.
To load and save game, it's better to follow that instruction as you said.

I don't know what you really want for saving game,
you can also use File.get_var() / File.store_var() for loading and saving game data.

by (9,800 points)
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.