I have a question about using var_to_str() and str_to_var() for saving and loading game objects to a file.

You would use from FileAccess the following methods:

FileAccess

open_encrypted(path: String, mode_flags: ModeFlags, key: PackedByteArray) static

FileAccess

open_encrypted_with_pass(path: String, mode_flags: ModeFlags, pass: String) static

There is an example how to use it with encryption.

1 Like