Inventory.DataLoad
Declaration#
public virtual void DataLoad(string filename)Parameters#
| Name | Description |
|---|---|
| filename | Name 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(Inventory target, string filename) { target.DataLoad(filename); }}Declaration#
public virtual void DataLoad(Stream stream)Parameters#
| Name | Description |
|---|---|
| stream | Stream 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(Inventory target, string filename) { using (FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read)) { target.DataLoad(fs); } }}