Skip to main content

SaveSystem.Load

Declaration#

public static void Load(bool includeSceneData)

Parameters#

NameDescription
includeSceneDataLoad data to the scene

Description#

Load data from default file

Usage#

Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void ExampleMethod()    {        // Load takes place in 2 phases        // 1st loading from file to memory        // 2nd loading from memory to scene        // Passing true will cause both phases to occur at once        SaveSystem.Load(false);    }
}

Declaration#

public static void Load(bool includeSceneData, Action onComplete)

Parameters#

NameDescription
includeSceneDataLoad data to the scene
onCompleteAction to invoke when load is complete

Description#

Load data from default file

Usage#

Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void ExampleMethod()    {        // Load takes place in 2 phases        // 1st loading from file to memory        // 2nd loading from memory to scene        // Passing true will cause both phases to occur at once        // You can pass an action to call when load is complete        SaveSystem.Load(true, LoadFinished);    }
    private void LoadFinished()    {        Debug.Log("SaveSystem: Load complete");    }
}