Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Class in Yarn.Unity
Inherits from VariableStorageBehaviour
A simple implementation of VariableStorageBehaviour.
This class stores variables in memory, and is erased when the game exits.
This class also has basic serialization and save/load example functions.
You can also enumerate over the variables by using a foreach
loop:
Note that as of v2.0, this class no longer uses Yarn.Value, to enforce static typing of declared variables within the Yarn Program.
Method in InMemoryVariableStorage
returns a boolean value representing if the particular variable is inside the variable storage
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
string
variableName
Removes all variables from storage.
returns a boolean value representing if the particular variable is inside the variable storage
Retrieves a Value
by name.
Dictionary<string, float>
floats
Dictionary<string, string>
strings
Dictionary<string, bool>
bools
bool
clear
string
variableName
bool
boolValue
string
variableName
float
floatValue
string
variableName
string
stringValue
Method in InMemoryVariableStorage
Retrieves a Value
by name.
Name | Description |
---|---|
The Value
. If a variable by the name of variableName
is not present, returns a value representing null
.
string
variableName
The name of the variable to retrieve the value of. Don't forget to include the "$" at the beginning!
T
result