Skip to main content

SaveSystem.SetBool

Declaration#

public static void SetBool(string section, string id, bool value)

Parameters#

NameDescription
sectionSection to set
idKey to set
valueValue to set

Description#

Sets boolean value for a key on a specific section

Usage#

Example
using NullSave.GDTK;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void ExampleMethod()    {        // Persistent data can be set directly        // You can separate your data into sections for faster save/load        // The same key can be present on multiple sections        // This value will be persisted on save/load        SaveSystem.SetBool("demoSection", "bool", true);
        // Temporary data may be used to keep values locally or between scenes        // This data is never saved or loaded.        SaveSystem.tempData.SetBool("boolTemp", false);    }
}