Skip to content

KevinReilhac/FerthurSaver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ferthur Saver

Save and load things.. in files.. probably not your best choice.

Features

  • Save things
  • Load things
  • Encrypt/Decript your files
  • Implement your own encryptors and serializers (probably better than mine)

Authors

Installation

Install FerthurSaver with Unity Package Manager

  https://github.com/KevinReilhac/FerthurSaver.git#upm

Usage/Examples

Initalization

//Pretty Json save file, no encryption
Save.Initialize(path, new JsonUtilitySaveSerializer(prettyPrint: true), null);

//Binary save file with aes encryption
string IV 	= "Wow Very Crypt";
string Key 	= "This is so secure";

Save.Initialize(path, new BinarySaveSerializer(), new AesSaveEncryptor(IV, Key));

Set data

Save.AddFeature<int>("MyPatheticInt", 666);
Save.AddFeature<float>("MyAnnoyingFloat", 6,9);
//OR
Save.Set<string>("MyUninterestingString", "stringValue");

Get data

Feature<int> intFeature = Save.Get<int>("MyPatheticInt", defaultValue: -42);
Debug.Log(intFeature.Value); // -> "666"

Write/Read Save

    Save.WriteSave("SaveName");
    Save.ReadSave("SaveName");

    //OR
    await Save.WriteSaveAsync("SaveName");
    await Save.ReadSaveAsync("SaveName");

    //Events
    Save.onWriteAsyncStart += Stuff();
    Save.onWriteAsyncComplete += OtherStuff();

Documentation

Read Documentation


I am not responsible for any use of this module, find a better one.

About

Customisable savefile system

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages