Skip to content
Hasan Bayat edited this page Jun 4, 2017 · 8 revisions

Welcome to the Save Game Free wiki! Here you will learn how to use the save game free in your unity games.

Features

The Save Game Free contains features that help you in the save and load process like:

  • Simplicity
  • Free to Use
  • Easy to Use
  • Powerful
  • Fast
  • Lightweight
  • Custom Serializer

Getting Started

Easily in your script when your game gets initialized like (Manager e.g. GameManager):

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using SaveGameFree;

public class GameManager : MonoBehaviour
{

	public const string MY_GAME_DATA_FILE_NAME = "myGameData";

	[Serializable]
	public class MyGameData
	{
		public int score = 0;
		public string playerName = "";
	}

	public MyGameData myGameData;

	void Awake ()
	{
		Saver.OnSaved += Saver_OnSaved;
		Saver.OnLoaded += Saver_OnLoaded;

		Saver.InitializeDefault ();
		myGameData = Saver.Load<MyGameData> ( MY_GAME_DATA_FILE_NAME );
	}

	void Saver_OnLoaded ( object obj )
	{
		MyGameData myGameDataLocal = obj as MyGameData;
		Debug.LogFormat ( "Loaded Succescully: {0}", myGameDataLocal );
	}

	void Saver_OnSaved ( object obj )
	{
		MyGameData myGameDataLocal = obj as MyGameData;
		Debug.LogFormat ( "Saved Succescully: {0}", myGameDataLocal );
	}

}

Tutorials

How to Create Custom Serializer?

How to Use Serializer?

How to Create Level System?

How to Serialize List?

How to Serialize Dictionary?

Resources

📖 Issues and file your issue.

✨ Asset Store

🚀 Itch.io

🔥 Releases

🏁 Development Board

License

MIT @ Bayat

Made with ❤️ by Bayat

Clone this wiki locally