- Avatar for text file to read and write data.
- Unity 5.3 or above.
- .Net Framework 3.5 or above.
- Windows.
- Read Json file to structure data, modify and write data to text file.
- Read key value lines file to dictionary data, modify and write data to text file.
- FileAvatar class to read and write text file content.
- JsonFileAvatar class inherit from FileAvatar to serialize content to structure data.
- KeyFileAvatar class inherit from FileAvatar to convert content to dictionary data.
//Key Value Line file.
var avatar = new KeyFileAvatar(file);//Auto pull content form file.
var value = avatar.GetValue(key);
avatar.SetValue(key, value);//Commit to cache.
avatar.Push();//Write content to local file.
//Json file.
var avatar = new JsonFileAvatar<Info>(file);//Auto pull content form file.
var info = avatar.Content;
info.tittle = "Tittle";
avatar.Commit(info);//Commit to cache.
avatar.Push();//Write content to local file.
- Demos in the path "MGS.Packages/FileAvatar/Demo/" provide reference to you.
Copyright © 2022 Mogoson. mogoson@outlook.com