Skip to main content

DataFile.GetString

Declaration#

public string GetString(string section, string id, string defaultValue)

Parameters#

NameDescription
sectionSection to read
idKey to read
defaultValueDefault value

Description#

Gets string value for a key on a specific section

Usage#

Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void ExampleMethod()    {        // You can create your own DataFiles to work with        DataFile target = new DataFile();
        // Values in a custom DataFile are never saved/loaded by the system        // They can be saved/loaded manually        var result = target.GetString("customSection1", "string", string.Empty);    }
}