0 votes

I am having some issues editing a variable stored in a file. I seem to be uncapable of JUST editing it. I can open the file, store variables in it and closing the file, but all the info stored in the file is overwritten by the newly stored info.

Is there any example around about just EDITING one variable in a file, keeping the rest of the info intact?

Thanks in advance to this great community!

in Engine by (16 points)

From my understanding of reading/writing files in the engine, a game first reads the variables (or whatever) in the file, then edits that data as necessary, and finally writes it out to the file. So a game could, for instance, read a JSON file, edit some arbitrary value in it, and write that data out to the JSON file.

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.