Skip to main content

Merchant.DataSave

Declaration#

public virtual void DataSave(string filename)

Parameters#

NameDescription
filenameName of file to create/update. Application.persistentDataPath is automatically prepended.

Description#

Saves data to a specified file

Usage#

using NullSave.GDTK.Inventory;using System.IO;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(Merchant target, string filename)    {        using (FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.Write))        {            target.DataSave(fs);        }    }}

Declaration#

public virtual void DataSave(Stream stream)

Parameters#

NameDescription
streamStream used to save data

Description#

Saves data to a stream.

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(Merchant target, string filename)    {        target.DataSave(filename);    }}