Method in VariableStorageBehaviour
Returns a boolean value representing if a particular variable is inside the variable storage.
string variableName
The name of the variable to check for.
true if this variable storage contains a value for the variable named variableName ; false otherwise.
Method in VariableStorageBehaviour
Provides a unified interface for exporting all variables. Intended to be a point for custom saving, editors, etc.
public abstract (System.Collections.Generic.Dictionary<string, float>, System.Collections.Generic.Dictionary<string, string>, System.Collections.Generic.Dictionary<string, bool>) GetAllVariables();public abstract bool Contains(string variableName);Method in VariableStorageBehaviour
Provides a unified interface for loading many variables all at once. Will override anything already in the variable storage.
public abstract void SetAllVariables(System.Collections.Generic.Dictionary<string, float> floats, System.Collections.Generic.Dictionary<string, string> strings, System.Collections.Generic.Dictionary<string, bool> bools, bool clear = true);bool clear
Method in VariableStorageBehaviour
public abstract void SetValue(string variableName, bool boolValue);string variableName
Method in VariableStorageBehaviour
public abstract bool TryGetValue<T>(string variableName, out T result);string variableName
Class in Yarn.Unity
Inherits from MonoBehaviour
A MonoBehaviour that a DialogueRunner uses to store and retrieve variables.
public abstract class VariableStorageBehaviour : MonoBehaviour, Yarn.IVariableStorageThis abstract class inherits from MonoBehaviour , which means that subclasses of this class can be attached to GameObject s.
Method in VariableStorageBehaviour
public abstract void SetValue(string variableName, string stringValue);string variableName
Method in VariableStorageBehaviour
public abstract void SetValue(string variableName, float floatValue);string variableName
Should the load also wipe the storage. Defaults to true so all existing variables will be cleared.
System.Collections.Generic.Dictionary<string, float> floats
System.Collections.Generic.Dictionary<string, string> strings
System.Collections.Generic.Dictionary<string, bool> bools
bool boolValue
T result
string stringValue
float floatValue
Returns a boolean value representing if a particular variable is inside the variable storage.
Provides a unified interface for exporting all variables. Intended to be a point for custom saving, editors, etc.
Provides a unified interface for loading many variables all at once. Will override anything already in the variable storage.