Method in Declaration
Creates a new instance of the Declaration class, using the given name and default value. The ReturnType of the new instance will be configured based on the type of defaultValue , and the DeclarationType will be Type.Variable . All other properties will be their default values.
public static Declaration CreateVariable(string name, Yarn.IType type, IConvertible defaultValue, string description = null)A new instance of the class.
string name
The name of the new declaration.
System.IConvertible defaultValue
The default value of the declaration. This must be a string, a number (integer or floating-point), or boolean value.
string description
The description of the new declaration.
type