All pages
Powered by GitBook
1 of 9

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Contains(string)

Method in VariableStorageBehaviour

Summary

Returns a boolean value representing if a particular variable is inside the variable storage.

Parameters

Name
Description

string variableName

The name of the variable to check for.

Returns

true if this variable storage contains a value for the variable named variableName ; false otherwise.

Clear()

Method in VariableStorageBehaviour

Summary

public abstract void Clear();

GetAllVariables()

Method in VariableStorageBehaviour

Summary

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);

SetAllVariables(System.Collections.Generic.Dictionary<string,float>,System.Collections.Generic.Dicti

Method in VariableStorageBehaviour

Summary

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);

Parameters

Name
Description

bool clear

SetValue(string,bool)

Method in VariableStorageBehaviour

Summary

public abstract void SetValue(string variableName, bool boolValue);

Parameters

Name
Description

string variableName

TryGetValue(string,T)

Method in VariableStorageBehaviour

Summary

public abstract bool TryGetValue<T>(string variableName, out T result);

Parameters

Name
Description

string variableName

VariableStorageBehaviour

Class in Yarn.Unity

Inherits from MonoBehaviour

Summary

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

public abstract class VariableStorageBehaviour : MonoBehaviour, Yarn.IVariableStorage

Remarks

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

Methods

Name
Description

SetValue(string,string)

Method in VariableStorageBehaviour

Summary

public abstract void SetValue(string variableName, string stringValue);

Parameters

Name
Description

string variableName

SetValue(string,float)

Method in VariableStorageBehaviour

Summary

public abstract void SetValue(string variableName, float floatValue);

Parameters

Name
Description

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.

Clear()
Contains(string)
GetAllVariables()
SetAllVariables(System.Collections.Generic.Dictionary<string,float>,System.Collections.Generic.Dictionary<string,string>,System.Collections.Generic.Dictionary<string,bool>,bool)
SetValue(string,bool)
SetValue(string,float)
SetValue(string,string)
TryGetValue(string,T)