GlobalStats.DataSave
Declaration#
public virtual void DataSave(Stream stream)Parameters#
| Name | Description |
|---|---|
| stream | Name of file to create/update. Application.persistentDataPath is automatically prepended. |
Description#
Saves data to a specified file
Usage#
Example
using NullSave.GDTK.Stats;using System.IO;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(GlobalStats target, string filename) { using(FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.Write)) { target.DataSave(fs); } }
}Declaration#
public virtual void DataSave(string filename)Parameters#
| Name | Description |
|---|---|
| filename | Name of file to create/update. Application.persistentDataPath is automatically prepended. |
Description#
Saves data to a specified file
Usage#
Example
using NullSave.GDTK.Stats;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(GlobalStats source) { if (!source.busy) { source.DataSave("test.sav"); } }
}