Library.RegisterFunction Method
Registers a new function that returns a value, which can be called from a Yarn program.
public void RegisterFunction(string name, int parameterCount, ReturningFunction implementation)
Remarks
If parameterCount
is -1, the function expects to
receive any number of parameters.
If a function named name
already exists in this Library, it
will be replaced.
Parameters
Parameter | Description |
---|---|
string name |
The name of the function. |
Int32 parameterCount |
The number of parameters that this function expects to receive. |
ReturningFunction implementation |
The ReturningFunction to be invoked when the function is called. |
Source
Defined in YarnSpinner/Library.cs, line 230.