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