ItemSource.DataSaveJSON
Declaration#
public virtual string DataSaveJSON(bool removeNulls, bool makeReadable)Parameters#
| Name | Description |
|---|---|
| removeNulls | Remove null items |
| makeReadable | Output JSON in a readable format with returns and tabs |
Description#
Saves JSON data to a JSON strting
Usage#
using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
public void Example(ItemSource target) { string result = target.DataSaveJSON(true, true); }
}Declaration#
public virtual void DataSaveJSON(string filename)Parameters#
| Name | Description |
|---|---|
| filename | Name of file to create/update. Application.persistentDataPath is automatically prepended. |
Description#
Saves JSON data to a specified file
Usage#
using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(ItemSource target, string filename) { target.DataSaveJSON(filename); }}