Skip to content

edamamet/Shell-Save

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Drag the ShellSaver.unitypackage file into your Unity project.

That's it!

Note: If you're using asmdef files, you will have to add the ShellSaver assembly definition to your asmdefs.

Usage

You can save a script by doing the following in code:

ShellSaver.Save(gameData, "Game Data"); // "Game Data.json" will be the name of the file

If you don't want your file to be overwritten, you can do the following:

ShellSaver.Save(gameData, "Game Data", false);

You can load a script by doing the following in code:

var gameData = ShellSaver.Load<GameData>("Game Data");

You can delete a saved file by doing the following in code:

ShellSaver.Delete("Game Data");

You can get all saved files by their file location by doing the following in code:

IEnumerable<string> savedFiles = ShellSaver.ListSaves();

And you can delete all saved files by doing the following in code:

ShellSaver.Clear();

Note: The GameData class/struct must be serializable.

Editor Tools

You can also view and edit saves in the editor by going to Tools > Shell Save.

Your save will look like the following:

Unity_qRcrjs3RRI.png

Refresh will refresh the list of saves.

Open Path will open the path of the persistent data path.

Clicking on a save will edit the save in your default text editor/IDE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages