Merchant.DataSave
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#
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#
| Name | Description |
|---|---|
| stream | Stream 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); }}