IVariableAccess
Provides a mechanism for retrieving values.
public interface IVariableAccess#Properties
#Program
Gets or sets the Yarn Program that stores information
about the initial values of variables, and is able to produce values
for smart variables.
Program? Program { get; set; }Type Program
#SmartVariableEvaluator
Gets or sets the object to use when evaluating smart variables.
ISmartVariableEvaluator? SmartVariableEvaluator { get; set; }#Methods
#GetVariableKind(string)
Gets the kind of variable named
name.VariableKind GetVariableKind(string name);Parameters
namestringThe name of the variable.
Returns VariableKind: A VariableKind enum representing the kind of
the variable named name.
#TryGetValue<T>(string, T?)
Given a variable name, attempts to fetch a value for the variable,
either from storage, initial values found in Program,
or by evaluating a smart variable found in Program.
bool TryGetValue<T>(string variableName, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result);Type Parameters
TThe type of the value to return. The fetched value will be converted to this type, if possible.
Parameters
variableNamestringThe name of the variable.resultTIf this method returnstrue, this parameter will contain the fetched value.
Returns Boolean: true if a value could be fetched; false otherwise.
Generated from Yarn Spinner for Unity 3.3.