GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - coryleach/UnitySaveLoad: Quickly Save/Load data in Binary or Json formats, and Encrypt it in Unity

BranchesTags
Open more actions menu

Latest commit

 

History

77 Commits
77 Commits

Folders and files

NameName
Last commit message
Last commit date
Editor
Editor
 
 
Runtime
Runtime
 
 
Tests
Tests
 
 
.codacy.yml
.codacy.yml
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Editor.meta
Editor.meta
 
 
LICENSE.md
LICENSE.md
 
 
LICENSE.md.meta
LICENSE.md.meta
 
 
README.md
README.md
 
 
README.md.meta
README.md.meta
 
 
Runtime.meta
Runtime.meta
 
 
Tests.meta
Tests.meta
 
 
package.json
package.json
 
 
package.json.meta
package.json.meta
 
 

Repository files navigation

Gameframe.SaveLoad 👋

Serialization helper utility that supports save, load and encryption.

Quick Package Install

Using UnityPackageManager (for Unity 2019.3 or later)

Open the package manager window (menu: Window > Package Manager)
Select "Add package from git URL...", fill in the pop-up with the following link:
https://github.com/coryleach/UnitySaveLoad.git#1.0.11

Using UnityPackageManager (for Unity 2019.1 or later)

Find the manifest.json file in the Packages folder of your project and edit it to look like this:

{
  "dependencies": {
    "com.gameframe.saveload": "https://github.com/coryleach/UnitySaveLoad.git#1.0.11",
    ...
  },
}

Usage

SaveLoadManager is not a singleton. Multiple instances may be used and created.
In the project tab menu select Create->Gameframe->SaveLoad->SaveLoadManager
This will create an instance of a SaveLoadManager asset.
Select the created object and configure options via the inspector.

//Use the Project tab's create menu GameFrame->SaveLoad->SaveLoadManager to create a manager
//You can then use public or serialized fields to reference your save system.
// OR
//Create a Manager at Runtime like this
manager = SaveLoadManager.Create("BaseDirectory","SaveDirectory",SerializationMethod.Default);

//Save object to disk in a file named "MySave.data"
manager.Save("MySave.data",objectToBeSaved);

//Load from disk
//loadedObject will be null if the file does not exist
var loadedObject = manager.Load<SavedObjectType>("MySave.data");

//Delete saved file
manager.DeleteSave("MySave.data");

//Setup a Custom Save/Load Method by passing any object that implements ISerializationMethod
manager.SetCustomSerializationMethod(new MyCustomSerializationMethod());

//Save a ScriptableObject or any object derived from UnityEngine.Object directly to disk
var myScriptableObject = ScriptableObject.CreateInstance<MyScriptableObjectType>();
manager.SaveUnityObject(myScriptableObject,"MyUnityObjectData.dat");

//Loading a UnityEngine.Object type requires an existing object to overwrite
//The following method will overwrite all the serialized fields on myScriptableObject with values loaded from disk
manager.LoadUnityObjectOverwrite(myScriptableObject,"MyUnityObjectData.data");

Enable Json.Net Support

This package has been tested with version 3.0.2 of the newtonsoft json package. Import the Netwonsoft Json package from the package manager or copy and paste the below into your package manifest.

"com.unity.nuget.newtonsoft-json": "3.0.2"

In player settings add the string 'JSON_DOT_NET' to Scripting Define Symbols.

Author

👤 Cory Leach

  • Twitter: @coryleach
  • Github: @coryleach

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by Gameframe.Packages

About

Quickly Save/Load data in Binary or Json formats, and Encrypt it in Unity

Topics

game-developmentgamedevhelperloadsavesavegameserializationunityunity3dutility

Resources

Readme
MIT license
Activity

Stars

58 stars

Watchers

1 watching

Forks

7 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.