0 votes

I am saving a scene to disk by packing it using PackedScene.pack(node) and then ResourceSaver.save(savename, packedscene). However, the resulting .tscn file doesn't contain any info on script variables, e.g. i have var type = 5 in a script inside the scene I just packed, but when loading the scene using ResourceLoader.load(), that "type" variable is unset. And the .tscn file itself (which is a text file) doesn't have any info about the "type" variable.
I want to be able to save info about script varaibles. I know there is a way to save your scenes by writing all data to a json file manually, but I want to avoid that as much as possible.

in Engine by (141 points)

Please log in or register to answer this question.

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.