Skip to main content

SaveSystem.GetQuaternion

Declaration#

public static Quaternion GetQuaternion(string section, string id, Quaternion defaultValue)

Parameters#

NameDescription
sectionSection to read
idKey to read
defaultValueDefault value

Description#

Gets quaternion 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        var permResult = SaveSystem.GetQuaternion("demoSection", "quaternion", new Quaternion(1.2f, 3.4f, 5.6f, 7.8f));
        // Temporary data may be used to keep values locally or between scenes        // This data is never saved or loaded.        var tempResult = SaveSystem.tempData.GetQuaternion("quaternionTemp", new Quaternion(9.0f, 10.1f, 11.2f, 12.3f));    }
}