Skip to main content

InventoryPlugin.DataSave

Declaration#

public virtual void DataSave(Stream stream)

Parameters#

NameDescription
streamStream to use

Description#

Save data to a 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.Create, FileAccess.Write))        {            foreach (InventoryPluginWrapper wrapper in target.plugins)            {                wrapper.plugin.DataSave(fs);            }        }    }}