This site is for Yarn Spinner v1, and won't be updated. Go to the current site.

VariableStorageBehaviour Class

A MonoBehaviour that a DialogueRunner uses to store and retrieve variables.

public abstract class VariableStorageBehaviour : MonoBehaviour, VariableStorage

Remarks

This abstract class inherits from MonoBehaviour, which means that subclasses of this class can be attached to GameObjects.

Methods

Name Description
Clear() Removes all variables from storage.
GetValue(String) Retrieves a Value by name.
ResetToDefaults() Resets the VariableStorageBehaviour to its initial state.
SetValue(String, Boolean) Stores a bool as a Value.
SetValue(String, Single) Stores a float as a Value.
SetValue(String, String) Stores a string as a Value.
SetValue(String, Value) Stores a Value.

Source

Defined in Unity/Assets/YarnSpinner/Scripts/DialogueRunner.cs, line 1179.