Inventory.DataLoad
#
Declarationpublic virtual void DataLoad(string filename)
#
ParametersName | Description |
---|---|
filename | Name of file to load. Application.persistentDataPath is automatically prepended. |
#
DescriptionLoads data from a specified file
#
Usageusing NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(Inventory target, string filename) { target.DataLoad(filename); }}
#
Declarationpublic virtual void DataLoad(Stream stream)
#
ParametersName | Description |
---|---|
stream | Stream used to load data. |
#
DescriptionLoads data to a specified stream
#
Usageusing NullSave.GDTK.Inventory;using System.IO;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(Inventory target, string filename) { using (FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read)) { target.DataLoad(fs); } }}