0 votes

If I create a
var noise = OpenSimplexNoise.New()

and write it to a json file, I get something like the following


If I then try to assign noise to it, it assigns it as a string, rather than as OpenSimplexNoise

How would I be able to properly re assign noise from a file? Is it even possible?

Godot version 3.2.1
in Engine by (47 points)

2 Answers

+2 votes

Is there any reason you can't just save the OpenSimplexNoise as a tres file? It's a resource.

by (7,769 points)
+1 vote

I don't think you would need to store the whole object, just store the seed value via text or json (or whatever other file type you choose) you should get the same results by loading the stored seed into a newly created OpenSimplexNoise object.

Kidscancode has a great tutorial that can get you started with saving to files if you are unfamiliar.

by (16 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 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.