LoadStateFromPlayerPrefs(string)

Method in DialogueRunner

Summary

Loads all variables from the UnityEngine.PlayerPrefs object into the Dialogue Runner's variable storage.

public bool LoadStateFromPlayerPrefs(string SaveKey = "YarnBasicSave")

Remarks

This method loads a string containing JSON from the UnityEngine.PlayerPrefs object under the key SaveKey, deserializes that JSON, and then uses the resulting object to set all variables in VariableStorage.

The loaded information can be stored via the SaveStateToPlayerPrefs(string) method.

Parameters

NameDescription

string SaveKey

The key to use when storing the variables.

Returns

true if the variables were successfully loaded from the player preferences; false otherwise.

See Also

Last updated

Yarn Spinnerยฎ and Secret Labยฎ are trade marks of Secret Lab Pty. Ltd., and are used by Yarn Spinner Pty. Ltd. under license.