0 votes

I'm working on a level editor, and I think the best approach would to save it as a .scn file that a user can open. Is this possible? If so, can someone explain to me how and/or where I can find some code or a project to help me in the right direction?

in Engine by (162 points)

1 Answer

0 votes
Best answer

You can use the PackedScene and ResourceSaver classes to save a node and it's children into a .scn file.

var scene = get_node("Node")
var packed = PackedScene.new()
packed.pack(scene)
ResourceSaver.save("saved_scene.scn", packed)
by (506 points)
selected by
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 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 webmaster@godotengine.org with your username.