All Projects → ewersp → SaveManager

ewersp / SaveManager

Licence: MIT license
A simple, yet powerful binary serializer for persisting game data in Unity.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to SaveManager

wasmbin
A self-generating WebAssembly parser & serializer in Rust.
Stars: ✭ 40 (+11.11%)
Mutual labels:  serializer
Apex.Serialization
High performance contract-less binary serializer for .NET
Stars: ✭ 82 (+127.78%)
Mutual labels:  serializer
Bois
Salar.Bois is a compact, fast and powerful binary serializer for .NET Framework. With Bois you can serialize your existing objects with almost no change.
Stars: ✭ 53 (+47.22%)
Mutual labels:  serializer
BarterOnly
An ecommerce platform to buy or exchange items at your convenience
Stars: ✭ 16 (-55.56%)
Mutual labels:  serializer
liqe
Lightweight and performant Lucene-like parser, serializer and search engine.
Stars: ✭ 513 (+1325%)
Mutual labels:  serializer
rtsp-types
RTSP (RFC 7826) types and parsers/serializers
Stars: ✭ 16 (-55.56%)
Mutual labels:  serializer
dingo-serializer-switch
A middleware to switch fractal serializers in dingo
Stars: ✭ 49 (+36.11%)
Mutual labels:  serializer
typeserializer
🎉 Awesome serializer / deserializer for javascript objects
Stars: ✭ 94 (+161.11%)
Mutual labels:  serializer
php-json-api
JSON API transformer outputting valid (PSR-7) API Responses.
Stars: ✭ 68 (+88.89%)
Mutual labels:  serializer
drf-action-serializer
A serializer for the Django Rest Framework that supports per-action serialization of fields.
Stars: ✭ 48 (+33.33%)
Mutual labels:  serializer
Cerializer
JSON Serializer using compile time reflection
Stars: ✭ 16 (-55.56%)
Mutual labels:  serializer
LVDS-7-to-1-Serializer
An Verilog implementation of 7-to-1 LVDS Serializer. Which can be used for comunicating FPGAs with LVDS TFT Screens.
Stars: ✭ 33 (-8.33%)
Mutual labels:  serializer
util
封装了一些Java常用的功能
Stars: ✭ 19 (-47.22%)
Mutual labels:  serializer
GenericLocalPersistence
GenericLocalPersistence is a clean and easy-to-use code that is useful for integrating local storage like UserDefaults, PList, Keychain.
Stars: ✭ 17 (-52.78%)
Mutual labels:  savedata
ta-json
Type-aware JSON serializer/parser
Stars: ✭ 67 (+86.11%)
Mutual labels:  serializer
cache
Laravel & Lumen Cache Service | File and Redis cache system
Stars: ✭ 19 (-47.22%)
Mutual labels:  serializer
EndianBinaryIO
A C# library that can read and write primitives, enums, arrays, and strings to streams and byte arrays with specified endianness, string encoding, and boolean sizes.
Stars: ✭ 20 (-44.44%)
Mutual labels:  serializer
ikeapack
Compact data serializer/packer written in Go, intended to produce a cross-language usable format.
Stars: ✭ 18 (-50%)
Mutual labels:  serializer
django-serializable-model
Django classes to make your models, managers, and querysets serializable, with built-in support for related objects in ~150 LoC
Stars: ✭ 15 (-58.33%)
Mutual labels:  serializer
jest-serializer-html-string
A better Jest snapshot serializer for plain html strings
Stars: ✭ 17 (-52.78%)
Mutual labels:  serializer

SaveManager

A simple, yet powerful binary serializer for persisting game data in Unity, written in C#.

We used this serializer for Poi to manage all saved game data with multiple save profiles and complex data storage classes.

We implemented the IGameSave interface for Xbox One and Wii U by creating XboxOneSaveManager.cs and WiiUSaveManager.cs (tested on dev kits for both). This allowed us to ignore Unity's PlayerPrefs API entirely, as it's not an ideal solution for saving data.

This solution also supports Steam Cloud without having to write a single additional line of code (via Steam Auto-Cloud).

Example Usage

// A sample data class to serialize
[Serializable]
public class SaveData {
	public int ID;
	public string Name;
	
	// Lists work too, for example, to make your own "PlayerPrefs"
	public List<KeyValuePair<string, int>> Flags = new List<KeyValuePair<string, int>>();
	
	// Etc... (safe to add new fields here, even if the file has already been serialized)
}

// It's a good idea to keep a reference to the manager somewhere in your project (ie: Singleton).
// For Poi, we had a small "GameSaveManager" Singleton wrapper which managed multiple save files.
StandaloneSaveManager manager = new StandaloneSaveManager();

// If the file doesn't exist, this will simply return a default SaveData instance
MySaveData data = manager.BinaryDeserialize<SaveData>("save.dat");

// Set some arbitrary data
data.Name = "Hello, World.";

// Write to disk
saveManager.BinarySerialize("save.dat", data);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].