StandardLibrary
public sealed class StandardLibraryInherits from System.Object
#Nested Types
- Contains the names of standard library functions whose implementations are expected to be provided by the game engine.
#Methods
#AllFunctions()
public static Dictionary<string, FunctionType> AllFunctions()Returns Dictionary: A dictionary of every function and it's definition keyed by name
Exceptions
System.ArgumentExceptionIf an expected function doesn't exist
#CallFunc(string, Value[], CancellationToken)
public static ValueTask<Yarn.Value> CallFunc(string functionName, Value[] parameters, CancellationToken token)Parameters
functionNamestringThe name of the functionparametersYarn.Value[]the list of parameters the function needstokenSystem.Threading.CancellationTokenCancellation token to use
Returns ValueTask: The Yarn Value that is the result of the function
Exceptions
System.ArgumentExceptionIf the function doesn't exist in the standard library
#GenerateUniqueCommandBlockViewedVariableName(string, string, int)
public static string GenerateUniqueCommandBlockViewedVariableName(string sourceFileName, string node, int lineNumber)Parameters
sourceFileNamestringThe absolute path to the yarn file that contains the once block.nodestringthe node that contains the once block.lineNumberintThe line number in the editor that opens the once block.
Returns String: A variable name.
#GenerateUniqueContentViewedVariableName(string)
public static string GenerateUniqueContentViewedVariableName(string lineID)Parameters
lineIDstringThe line ID to generate a variable name for.
Returns String: A variable name.
Alice: this is my once line <<once>> #line:abc123 the input should be "line:abc123".#GenerateUniqueVisitedVariableForNode(string)
public static string GenerateUniqueVisitedVariableForNode(string nodeName)Parameters
nodeNamestringThe name of the node that needs to have a tracking variable created.
Returns String: The new variable name.
#TryGetFunction(string, FunctionType)
public static bool TryGetFunction(string functionName, out FunctionType function)Parameters
functionNamestringthe name of the functionfunctionYarn.FunctionTypeThe function definition
Returns Boolean: true if the function has a definition
Generated from Yarn Spinner for Unity 3.3.