Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

InterSUCC

This library is an extension for SUCC which adds generic DataFile types. These new types let you save and load data without using any magic strings.

Before:

DataFile File = new DataFile("game.succ");

void SaveHighscore(int score)
    => File.Set("highscore", score);

int LoadHighscore()
    => File.Get<int>("highscore");

After:

public interface IFileData
{
    int Highscore { get; set; }
}

DataFile<IFileData> File = new DataFile<IFileData>("game.succ");

void SaveHighscore(int score)
    => File.Data.Highscore = score;

int LoadHighscore()
    => File.Data.Highscore;

Installing

InterSUCC requires SUCC and ClassImpl.

InterSUCC can be installed via the Unity Package Manager. To do so, add the following to the dependencies array in your manifest.json:

"com.jimmycushnie.intersucc": "https://github.com/JimmyCushnie/InterSUCC.git#unity"

Limitations

Due to the nature of InterSUCC's implementation, there's no way to set a default value as you're loading a value. Therefore, it is recommended that you set default values for your files using the Default Files feature.

ConfigWithOverride

Todo document this feature

About

Use SUCC without using magic strings

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.