Where does Yarn Spinner (v3, Unity) keep dialogue variables, how does its built-in save/load work, and does the save carry any version marker?
Yarn Spinner for Unity keeps variables in a replaceable VariableStorage (in-memory by default, so unsaved state is lost on scene unload or quit); the built-in save writes an unversioned JSON of six parallel key/value arrays to persistentDataPath, and loading replaces existing variables because SetAllVariables clears by default. The docs' sample Contains returns values == null, the inverse of the documented meaning, so copying it into a custom storage would break existence checks.
Yarn Spinner for Unity keeps variables in a replaceable VariableStorage (in-memory by default, so unsaved state is lost on scene unload or quit); the built-in save writes an unversioned JSON of six parallel key/value arrays to persistentDataPath, and loading replaces existing variables because SetAllVariables clears by default. The docs' sample Contains returns values == null, the inverse of the documented meaning, so copying it into a custom storage would break existence checks.
Curator qualifications: Code/docs read 2026-10-22; no game saved or loaded.
Limitations: Code/docs read 2026-10-22; no game saved or loaded.
Evidence status: statements located in the cited sources by a correlated desk review (Claude); not executed; not independently reviewed.
Structured fields
{
"citations": [
{
"url": "https://docs.yarnspinner.dev/components/variable-storage/variable-storage",
"note": "Runtime/DialogueRunner/DialogueRunner.Utility.cs L44-51, L84-87, L173-181; Runtime/Storage/InMemoryVariableStorage.cs L269; docs.yarnspinner.dev variable-storage page"
},
{
"url": "https://github.com/YarnSpinnerTool/YarnSpinner-Unity/blob/90fb4c462355514bb4a8fdc0085a327f71f1b561/Runtime/DialogueRunner/DialogueRunner.Utility.cs",
"note": "Runtime/DialogueRunner/DialogueRunner.Utility.cs L44-51, L84-87, L173-181; Runtime/Storage/InMemoryVariableStorage.cs L269; docs.yarnspinner.dev variable-storage page"
},
{
"url": "https://github.com/YarnSpinnerTool/YarnSpinner-Unity/blob/90fb4c462355514bb4a8fdc0085a327f71f1b561/Runtime/Storage/InMemoryVariableStorage.cs",
"note": "Runtime/DialogueRunner/DialogueRunner.Utility.cs L44-51, L84-87, L173-181; Runtime/Storage/InMemoryVariableStorage.cs L269; docs.yarnspinner.dev variable-storage page"
}
]
}Evidence claims
- [sourced_fact] Yarn Spinner for Unity keeps variables in a replaceable VariableStorage (in-memory by default, so unsaved state is lost on scene unload or quit); the built-in save writes an unversioned JSON of six parallel key/value arrays to persistentDataPath, and loading replaces existing variables because SetAllVariables clears by default. The docs' sample Contains returns values == null, the inverse of the documented meaning, so copying it into a custom storage would break existence checks. · locator: Runtime/DialogueRunner/DialogueRunner.Utility.cs L44-51, L84-87, L173-181; Runtime/Storage/InMemoryVariableStorage.cs L269; docs.yarnspinner.dev variable-storage page source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |
Linked records
- cites → https://docs.yarnspinner.dev/components/variable-storage/variable-storage
- cites → https://github.com/YarnSpinnerTool/YarnSpinner-Unity/blob/90fb4c462355514bb4a8fdc0085a327f71f1b561/Runtime/DialogueRunner/DialogueRunner.Utility.cs
- cites → https://github.com/YarnSpinnerTool/YarnSpinner-Unity/blob/90fb4c462355514bb4a8fdc0085a327f71f1b561/Runtime/Storage/InMemoryVariableStorage.cs