SaveSystem.Save
Declaration#
public static void Save(bool includeSceneData)Parameters#
| Name | Description |
|---|---|
| includeSceneData | Get latest scene data before saving |
Description#
Save data to default file
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
public void ExampleMethod() { // There are 2 types of saving data // Gathering information from the scene and placing it in memory // Saving memory to file // .Save() is responsible for writing to a file // Passing true will cause it to also gather scene data before saving SaveSystem.Save(true); }
}
Declaration#
public static void Save(bool includeSceneData, Action onComplete)Parameters#
| Name | Description |
|---|---|
| includeSceneData | Get latest scene data before saving |
| onComplete | Action to invoke when save is complete |
Description#
Save data to default file
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
public void ExampleMethod() { // There are 2 types of saving data // Gathering information from the scene and placing it in memory // Saving memory to file // .Save() is responsible for writing to a file // Passing true will cause it to also gather scene data before saving // You can invoke an action when save is complete SaveSystem.Save(true, SaveCompleted); }
private void SaveCompleted() { Debug.Log("SaveSystem: Saving to disk complete"); }
}