Storage Manager

An asset by DavidKBD
The page banner background of a mountain and forest
Storage Manager hero image

Quick Information

0 ratings
Storage Manager icon image
DavidKBD
Storage Manager

Here is a class called Storage that allows loading and saving json files, text-plain and data.But you can add the StorageManager in your scene to access to that class. You can turn TRUE the "blocker" property in this Node to specify that in case of error a message should be displayed and the game ended.

Supported Engine Version
3.2
Version String
0.1
License Version
MIT
Support Level
community
Modified Date
3 years ago
Git URL
Issue URL

Godot_StorageManager

Utility to facilitate file loading and writing management

Here is a class called Storage that allows loading and saving json files, text-plain and data.

But you can add the StorageManager in your scene to access to that class. You can turn TRUE the "blocker" property in this Node to specify that in case of error a message should be displayed and the game ended.

Example code (Load Encrypted Data)

var storage : Storage = Storage.new("user://settings.data", "ENCRYPT_PASSWORD")
var data = storage.load_data()
if data.result == OK:
    AudioServer.set_bus_volume_db(0, linear2db(data.data.volume))
    OS.vsync_enabled = data.data.vsync
else:
     AudioServer.set_bus_volume_db(0, linear2db(.8))
    OS.vsync_enabled = true

Example code (Store Encrypted Data)

var storage : Storage = Storage.new("user://settings.data", "ENCRYPT_PASSWORD")
var result = storage.store_data({ "xxx": "yyy" })
if result != OK: print("Error")

Example code (Load JSON)

var storage : Storage = Storage.new("res://file.json")
var data = storage.load_json()
if data.result == OK:
    print(data)
else:
    print("ERROR")

Example code (Store Encrypted Data)

var storage : Storage = Storage.new("user://settings.data")
var result = storage.store_json({ "xxx": "yyy" })
if result != OK: print("Error")

Thats all!

If you are felling it, please leave a donation!

README PayPal button

Here is a class called Storage that allows loading and saving json files, text-plain and data.

But you can add the StorageManager in your scene to access to that class. You can turn TRUE the "blocker" property in this Node to specify that in case of error a message should be displayed and the game ended.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Storage Manager icon image
DavidKBD
Storage Manager

Here is a class called Storage that allows loading and saving json files, text-plain and data.But you can add the StorageManager in your scene to access to that class. You can turn TRUE the "blocker" property in this Node to specify that in case of error a message should be displayed and the game ended.

Supported Engine Version
3.2
Version String
0.1
License Version
MIT
Support Level
community
Modified Date
3 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers