All pages
Powered by GitBook
1 of 1

Loading...

SaveStateToPlayerPrefs(string)

Method in DialogueRunner

This method is obsolete and may be removed from a future version of Yarn Spinner.

Summary

Saves all variables in the Dialogue Runner's variable storage into the UnityEngine.PlayerPrefs object.

public void SaveStateToPlayerPrefs(string SaveKey = "YarnBasicSave")

Remarks

This method serializes all variables in VariableStorage into a string containing JSON, and then stores that string in the UnityEngine.PlayerPrefs object under the key SaveKey.

The stored information can be restored via the LoadStateFromPlayerPrefs(string) method.

Parameters

Name
Description
  • : Provides a unified interface for exporting all variables. Intended to be a point for custom saving, editors, etc.

string SaveKey

The key to use when storing the variables.

See Also

VariableStorageBehaviour.GetAllVariables()