Save Listeners

CarterGames.SaveManager.Runtime
CarterGames.Assets.SaveManager

The save listeners interface lets you hook into the save manager saving & loading directly. You can implement these interfaces to run your own logic when the save system does stuff. You can also just use the Save Manager events should you wish, which can be seen in the Save Manager API

API

ISaveListener

Methods

Method

Runs when the game has been called to save by any means to the save file.

public class Example : MonoBehaviour, ISaveListener
{
    public void OnGameSaveCalled()
    {
        // Your logic here!
    }
}

Method

Runs when the game has completed saving to the save file, this normally is pretty quick so will run more or less right after the OnGameSaveCalled() is invoked.

public class Example : MonoBehaviour, ISaveListener
{
    public void OnGameSaveCompleted()
    {
        // Your logic here!
    }
}

ILoadListener

Methods

Method

Runs when the game has been called to load by any means from the save file.

public class Example : MonoBehaviour, ILoadListener
{
    public void OnGameLoadCalled()
    {
        // Your logic here!
    }
}

Method

Runs when the game has completed loading from the save file, this normally is pretty quick so will run more or less right after the OnGameLoadCalled() is invoked.

public class Example : MonoBehaviour, ILoadListener
{
    public void OnGameLoadCompleted()
    {
        // Your logic here!
    }
}