Skip to main content

Merchant.DataLoad

Declaration#

public virtual void DataLoad(string filename)

Parameters#

NameDescription
filenameName of file to load. Application.persistentDataPath is automatically prepended.

Description#

Loads data from a specified file

Usage#

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

Declaration#

public virtual void DataLoad(Stream stream)

Parameters#

NameDescription
streamStream used to load data.

Description#

Loads data to a specified stream

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.Open, FileAccess.Read))        {            target.DataLoad(fs);        }    }}